Current i m doing one image editing android app in which i need to take screenshot of one relative layout My code:
public Bitmap takeScreenshot() {
Bitmap bitTmp;
View rootView = findViewById(R.id.rl_img_view);
rootView.setDrawingCacheEnabled(true);
bitTmp = rootView.getDrawingCache();
return bitTmp;
}
my problem is that when i take screenshot it send me bitmap which contain empty part of layout as black color. Is it possible to get that empty part transparent on output bitmap?
Output i get: http://postimg.org/image/5mxznc6jv
Output i want: http://postimg.org/image/50bre04kf