I\'m trying to take a screenshot in code in Android. Actually the screenshot is the bitmap of the main RelativeLayout. The screenshot is taken but the content appears wrong, the
Specify the screen size in makeMeasureSpec
...
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
v.measure(MeasureSpec.makeMeasureSpec(0, size.x),
MeasureSpec.makeMeasureSpec(0, size.y));
...
Also try setting the setDrawingCacheQuality to high, so that it returns a higher resolution bitmap.