One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
public class CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |
Android Studio exposes developers to -nodpi
and -anydpi
in various places. For example, if you use the New Resource Directory wizard thing, and you choose to add a density qualifier to the directory, you will see "No Density" (-nodpi
) and "Any Density" (-anydpi
) options.
Some of you might expect these to be well-documented.
In a word, no.
However, courtesy of a fair amount of experimentation (largely done as part of work on this Stack Overflow question and this answer), their use becomes at least a bit clearer. Many thanks to Stack Overflow user rds for the help!