Back to project page Material.
The source code is released under:
Apache License
If you think the Android project Material listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.rey.material.drawable; // w ww.j a v a 2 s .com import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.PixelFormat; import android.graphics.drawable.Drawable; /** * A drawable that draw nothing. * @author Rey * */ public class BlankDrawable extends Drawable { private static BlankDrawable mInstance; public static BlankDrawable getInstance(){ if(mInstance == null) synchronized (BlankDrawable.class) { if(mInstance == null) mInstance = new BlankDrawable(); } return mInstance; } @Override public void draw(Canvas canvas) {} @Override public void setAlpha(int alpha) {} @Override public void setColorFilter(ColorFilter cf) {} @Override public int getOpacity() { return PixelFormat.TRANSPARENT; } }