public PurgeableBitmapView(Context context, boolean isPurgeable) { super(context); setFocusable(true); mOptions.inPurgeable = isPurgeable; int[] colors = createColors(); Bitmap src = Bitmap.createBitmap(colors, 0, STRIDE, WIDTH, HEIGHT, Bitmap.Config.ARGB_8888); bitstream = generateBitstream(src, Bitmap.CompressFormat.JPEG, 80); mPaint.setTextSize(textSize); mPaint.setColor(Color.GRAY); }
public PurgeableBitmapView(Context context, boolean isPurgeable) { super(context); setFocusable(true); mOptions.inPurgeable = isPurgeable; int[] colors = createColors(); Bitmap src = Bitmap.createBitmap(colors, 0, STRIDE, WIDTH, HEIGHT, Bitmap.Config.ARGB_8888); bitstream = generateBitstream(src, Bitmap.CompressFormat.JPEG, 80); mPaint.setTextSize(textSize); mPaint.setColor(Color.GRAY); }