Java Code Examples for android.view.View#setBackgroundTintList()

The following examples show how to use android.view.View#setBackgroundTintList() . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: aircon   File:    License: MIT License 5 votes vote down vote up
protected void setAttr(final View view, final int color) {
	else {
		    .setColorFilter(color, PorterDuff.Mode.SRC_IN);
Example 2
Source Project: DevUtils   File:    License: Apache License 2.0 5 votes vote down vote up
 * 设置背景着色颜色
 * @param view {@link View}
 * @param tint 着色颜色
 * @return {@link View}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public static View setBackgroundTintList(final View view, final ColorStateList tint) {
    if (view != null) {
        try {
        } catch (Exception e) {
            LogPrintUtils.eTag(TAG, e, "setBackgroundTintList");
    return view;
Example 3
Source Project: letv   File:    License: Apache License 2.0 4 votes vote down vote up
static void setBackgroundTintList(View view, ColorStateList tintList) {