I have a GridView
to show images. Every image click show the list activity as dialog based on same position. When I click the back button, I need to capture a screen shot of the list activity. How can I do this?
Here is an example to work, but it doesn't capture the list activity as dialog activity.
View v1 = getWindow().getDecorView().getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bm = v1.getDrawingCache();
BitmapDrawable bitmapDrawable = new BitmapDrawable(bm);
holder.cardBack.setBackgroundDrawable(bitmapDrawable);
// holder.cardBack.setBackgroundResource(R.drawable.a);
holder.rootLayout.startAnimation(flipAnimation);