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
Remove the lines:
v.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); //v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); v.layout(0, 0, v.getWidth(), v.getHeight());