Code example for Canvas

Methods: setDrawFilter

0
    private static final Paint sBlurPaint = new Paint();
    private static final Paint sGlowColorPressedPaint = new Paint();
    private static final Paint sGlowColorFocusedPaint = new Paint();
    private static final Paint sDisabledPaint = new Paint();
    private static final Rect sOldBounds = new Rect();
    private static final Canvas sCanvas = new Canvas();
 
    static { 
        sCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG,
                Paint.FILTER_BITMAP_FLAG));
    } 
    static int sColors[] = { 0xffff0000, 0xff00ff00, 0xff0000ff };
    static int sColorIndex = 0;
 
    /** 
     * Returns a bitmap suitable for the all apps view. Used to convert pre-ICS 
     * icon bitmaps that are stored in the database (which were 74x74 pixels at hdpi size) 
     * to the proper size (48dp) 
     */ 
    static Bitmap createIconBitmap(Bitmap icon, Context context) {
Contextual code suggestions in your IDE  Get Codota for Java