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

The following examples show how to use android.view.View#setLayerPaint() . 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: FoldingLayoutActivity.java    From UltimateAndroid with Apache License 2.0 6 votes vote down vote up
@SuppressLint("NewApi")
private void setSepiaLayer(View view, boolean isSepiaLayerOn) {
    if (!IS_JBMR2) {
        if (isSepiaLayerOn) {
            if (Build.VERSION.SDK_INT >= 17) {
                view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
                view.setLayerPaint(mSepiaPaint);
            }

        } else {
            if (Build.VERSION.SDK_INT >= 17) {
                view.setLayerPaint(mDefaultPaint);
            }

        }
    }
}
 
Example 2
Source File: FoldingLayoutActivity.java    From UltimateAndroid with Apache License 2.0 6 votes vote down vote up
@SuppressLint("NewApi")
private void setSepiaLayer(View view, boolean isSepiaLayerOn) {
    if (!IS_JBMR2) {
        if (isSepiaLayerOn) {
            if (Build.VERSION.SDK_INT >= 17) {
                view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
                view.setLayerPaint(mSepiaPaint);
            }

        } else {
            if (Build.VERSION.SDK_INT >= 17) {
                view.setLayerPaint(mDefaultPaint);
            }

        }
    }
}
 
Example 3
Source File: FoldingLayoutActivity.java    From Folding-Android with Apache License 2.0 6 votes vote down vote up
@SuppressLint("NewApi")
private void setSepiaLayer(View view, boolean isSepiaLayerOn) {
	if (!IS_JBMR2) {
		if (isSepiaLayerOn) {
			if (Build.VERSION.SDK_INT >= 17) {
				view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
				view.setLayerPaint(mSepiaPaint);
			}

		} else {
			if (Build.VERSION.SDK_INT >= 17) {
				view.setLayerPaint(mDefaultPaint);
			}

		}
	}
}
 
Example 4
Source File: FoldingLayoutActivity.java    From FoldingLayout with Apache License 2.0 5 votes vote down vote up
private void setSepiaLayer (View view, boolean isSepiaLayerOn) {
    if (!IS_JBMR2) {
        if (isSepiaLayerOn) {
            view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
            view.setLayerPaint(mSepiaPaint);
        } else {
            view.setLayerPaint(mDefaultPaint);
        }
    }
}
 
Example 5
Source File: ViewCompatJellybeanMr1.java    From letv with Apache License 2.0 4 votes vote down vote up
public static void setLayerPaint(View view, Paint paint) {
    view.setLayerPaint(paint);
}
 
Example 6
Source File: an.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static void a(View view, Paint paint)
{
    view.setLayerPaint(paint);
}
 
Example 7
Source File: ViewCompatJellybeanMr1.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static void setLayerPaint(View view, Paint paint) {
    view.setLayerPaint(paint);
}
 
Example 8
Source File: ViewCompatJellybeanMr1.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static void setLayerPaint(View view, Paint paint) {
    view.setLayerPaint(paint);
}
 
Example 9
Source File: ViewCompatJellybeanMr1.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static void setLayerPaint(View view, Paint paint) {
    view.setLayerPaint(paint);
}
 
Example 10
Source File: ViewCompatJellybeanMr1.java    From guideshow with MIT License 4 votes vote down vote up
public static void setLayerPaint(View view, Paint paint) {
    view.setLayerPaint(paint);
}