We have foreground image where some area of that image are transparent & we are showing another image underlying in transparent region. So when we are going to save it, it will be saving full screen. so we want particular area of screen to be saved in the gallery. Here is the code which we used to save..
save.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
mDecorView = getWindow().getDecorView();
runOnUiThread(new Runnable() {
public void run() {
mDecorView.invalidate();
mDecorView.post(this);
}
});
View v1 = mDecorView.getRootView();
System.out.println("Root View : "+v1);
v1.setDrawingCacheEnabled(true);
try {
BitmapSave(v1.getDrawingCache());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
Please help us friends. Thanks