0

I'm using a set of bitmaps to draw my SurfaceView and developing a night mode. To turn on night mode I just darken all bitmaps and redraw the SurfaceView:

    Bitmap newBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
    Canvas c = new Canvas(newBitmap);
    Paint paint = new Paint();
    paint.setColorFilter(new LightingColorFilter(0x808080, 0));
    c.drawBitmap(bitmap, 0, 0, paint);
    bitmap = newBitmap;

But how can I lighten these bitmaps when I need to turn off night mode?

auntyellow
  • 2,423
  • 2
  • 20
  • 47

0 Answers0