I am doing screenshot and returning a bitmap using the next method.
public Bitmap takeScreenShot(View view) {
view.setDrawingCacheEnabled(true);
view.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW);
view.buildDrawingCache();
if (view.getDrawingCache() == null) return null;
Bitmap snapshot = Bitmap.createBitmap(view.getDrawingCache());
view.setDrawingCacheEnabled(false);
view.destroyDrawingCache();
return snapshot;
}
and i call it something like this
takeScreenShot(getWindow().getDecorView().findViewById(android.R.id.content))
My problem is that i have some layout that contain listviews/gridviews , how can i screenshot the entire layout extended ?