问题
Am using Linear layout with is more then the mobile screen size. with visibility is hidden that layout have some content inside. I need to take export that complete activity as image format see the reference image i attached

How to get the complete activity as image (jpeg or any other)
I tried with this code but i can not able to get the full width image. i got only up to the mobile screen
Please correct it
View layoutview = (LinearLayout) findViewById(R.id.layout_outer);
layoutview.setDrawingCacheEnabled(true);
Bitmap bimg = layoutview.getDrawingCache();
File imgPath = new File("/sdcard/sample.png");
FileOutputStream fOs = null;
try {
fOs = new FileOutputStream(imgPath);
bimg.compress(Bitmap.CompressFormat.PNG, 100, fOs);
fOs.flush();
fOs.close();
btndsbExport.setVisibility(View.VISIBLE);
}catch (FileNotFoundException e) {
e.printStackTrace();
enter code here
} catch (Exception e) {
e.printStackTrace();
}
来源:https://stackoverflow.com/questions/16942641/convert-android-activity-layout-to-any-image-format