How to take screenshot for specific Layout
This code take screenshot for the the activity without the status bar i want to take screen for scroll view
View view = getWindow().getDecorView();
view.setDrawingCacheEnabled(true);
view.buildDrawingCache(true);
Bitmap b1 = view.getDrawingCache();
Rect frame = new Rect();
this.getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
int statusBarHeight = frame.top;
int width = this.getWindowManager().getDefaultDisplay().getWidth();
int height = this.getWindowManager().getDefaultDisplay()
.getHeight();
Bitmap bm = Bitmap.createBitmap(b1, 0, statusBarHeight, width,
height - statusBarHeight);
I want to take screenshot for the scroll view
i searched a lot here but i find nothing hope any one can help