anything from the android framework in a view-model is overkill in my opinion
I thought the same way until I tried to apply that as a hard rule. It just makes your design better.
View.VISIBLE can be set in the View. Resources are easy to mock but consider instead of doing:
Just save the ID (
.R is perfectly fine in ViewModels)
and let the view get the resource. If you need to do string manipulation use the framework’s.
(We’re actually mocking Context in Blueprints)
As for testing, a lot of Android classes don’t need Roboelectric (sic)
I’d say none, but it can make you cut some corners.
I know some people have doubts about the data-binding library, so it’s good to see an alternative approach is available.
It’s *not* an alternative. Both are observables but they’re used for different things. A combination of both is very powerful, in my opinion.