Java Code Examples for android.support.v4.graphics.drawable.DrawableCompat#getColorFilter()

The following examples show how to use android.support.v4.graphics.drawable.DrawableCompat#getColorFilter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VectorDrawableCommon.java    From VectorChildFinder with Apache License 2.0 5 votes vote down vote up
@Override
public ColorFilter getColorFilter() {
    if (mDelegateDrawable != null) {
        return DrawableCompat.getColorFilter(mDelegateDrawable);
    }
    return null;
}
 
Example 2
Source File: VerticalCoordinatorLayout.java    From swipe-maker with Apache License 2.0 4 votes vote down vote up
private void applyColorFilter(Color color) {
    if (DrawableCompat.getColorFilter(mBg.getDrawable()) == color.getColor(getContext())) {
        return;
    }
    mBg.setColorFilter(color.getColor(getContext()));
}
 
Example 3
Source File: TwoStepRightCoordinatorLayout.java    From swipe-maker with Apache License 2.0 4 votes vote down vote up
private void applyColorFilter(Color color) {
    if (DrawableCompat.getColorFilter(mBg.getDrawable()) == color.getColor(getContext())) {
        return;
    }
    mBg.setColorFilter(color.getColor(getContext()));
}
 
Example 4
Source File: SwingCoordinatorLayout.java    From swipe-maker with Apache License 2.0 4 votes vote down vote up
private void applyColorFilter(Color color) {
    if (DrawableCompat.getColorFilter(mBg.getDrawable()) == color.getColor(getContext())) {
        return;
    }
    mBg.setColorFilter(color.getColor(getContext()));
}