When Creating bitmap for canvas in onSizeChanged() I am getting OutOfMemoryError
I am creating Bitmap like this
Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
I am getting OutOfMemoryError exception when zooming canvas.
How I can handle this exception?