I created a Bitmap and use it in Canvas to draw a circle and this method is called every time the Activity gets called and Activity get called multi-times so that time I am getting some error like 1536000-byte external allocation too large for this process
I know that error is Memory issue but how to Clear bitmap and also use at second time Activity call..
My Code is :
private void Draw_Hold_Circle() {
Bitmap bitmap_hold = Bitmap.createBitmap(width, height,
Bitmap.Config.ARGB_8888);
Canvas canvas_hold = new Canvas(bitmap_hold);
canvas_hold.drawArc(rect_open, 0, 360, false, mOutlinePaint);
}
This Method is called 4 times and the MainActivity can call multi-time so How to maintain Bitmap and its Memory?