List of usage examples for android.support.v4.view TintableBackgroundView setSupportBackgroundTintMode
void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode);
From source file:android.support.v7.testutils.AppCompatTintableViewActions.java
/** * Sets the passed mode as the background tint mode on a <code>View</code> that * implements the <code>TintableBackgroundView</code> interface. *///from w w w .j ava2s . c o m public static ViewAction setBackgroundTintMode(final PorterDuff.Mode tintMode) { return new ViewAction() { @Override public Matcher<View> getConstraints() { return allOf(isDisplayed(), TestUtilsMatchers.isTintableBackgroundView()); } @Override public String getDescription() { return "set background tint mode"; } @Override public void perform(UiController uiController, View view) { uiController.loopMainThreadUntilIdle(); TintableBackgroundView tintableBackgroundView = (TintableBackgroundView) view; tintableBackgroundView.setSupportBackgroundTintMode(tintMode); uiController.loopMainThreadUntilIdle(); } }; }