Let's say you have this code:
textview.setText("This Is Camel Case");
And you want to interact with it in an Espresso test:
import static android.support.test.espresso.matcher.ViewMatchers.withText;
onView(withText("this is camel case"))
.check(matches(isDisplayed()));
This view would fail the matcher because of the capital letters. But using this matcher will be fine:
import static com.example.app.IgnoreCaseTextMatcher.withText;
onView(withText("this is camel case"))
.check(matches(isDisplayed()));
Or simply do this: