mGlowColorPressedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30)); mGlowColorFocusedPaint.setColor(context.getTheme().resolveAttribute( android.R.attr.colorFocusedHighlight, value, true) ? value.data : 0xffff8e00); mGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30)); ColorMatrix cm = new ColorMatrix(); cm.setSaturation(0.2f); mCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG, Paint.FILTER_BITMAP_FLAG)); } public Drawable createIconDrawable(Drawable src) { Bitmap scaled = createIconBitmap(src); StateListDrawable result = new StateListDrawable(); result.addState(new int[] { android.R.attr.state_focused }, new BitmapDrawable(createSelectedBitmap(scaled, false))); result.addState(new int[] { android.R.attr.state_pressed },