Code example for PaintFlagsDrawFilter

0
        private final Rect mOldBounds = new Rect();
        private Canvas mCanvas = new Canvas();
         
        public IconResizer(Context context) {
            mCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG,
                    Paint.FILTER_BITMAP_FLAG));
             
            final Resources resources = context.getResources();
            mIconWidth = mIconHeight = (int) resources.getDimension(
                    android.R.dimen.app_icon_size);
        } 
 
        /** 
         * Returns a Drawable representing the thumbnail of the specified Drawable. 
         * The size of the thumbnail is defined by the dimension 
         * android.R.dimen.launcher_application_icon_size. 
         * 
         * This method is not thread-safe and should be invoked on the UI thread only. 
         * 
         * @param icon The icon to get a thumbnail of. 
Connect your IDE to all the code out there  Get Codota for Java