INNER CODE UNIT · Java
setBackgroundColor
florent37/ShapeOfView · shapeofview/src/main/java/io/github/florent37/shapeofview/ShapeOfView.java:71
public void setBackgroundColor(int color) {
//disabled here, please set a background to to this view child
//super.setBackgroundColor(color);
}
private void init(Context context, AttributeSet attrs) {
clipPaint.setAntiAlias(true);
setDrawingCacheEnabled(true);
setWillNotDraw(false);
clipPaint.setColor(Color.BLUE);
clipPaint.setStyle(Paint.Style.FILL);
clipPaint.setStrokeWidth(1);
if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1){
clipPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));