I have a View and I want to convert it into an image in order to store it somewhere. But how can I convert this View to an image?
View
Enable drawing cache on the view:
view.setDrawingCacheEnabled(true);
Create a bitmap from the cache:
bitmap = Bitmap.createBitmap(view.getDrawingCache());
Save the bitmap wherever...
Disable drawing cache:
view.setDrawingCacheEnabled(false);