How To Save Multiple Imageviews As One Bitmap While Maintaining Position Of Each Imageview In Android?
I have three ImageViews that I need to be able to save as one single Bitmap. The following code works to save the three ImageViews as one Bitmap but it pushes each image to the top
Solution 1:
canvas.drawBitmap(handleBmp, 1, 1, null);
that 1,1, can set the position
Solution 2:
Regarding to the context of this question, what I think you should do is, arrange all your ImageView in single parent layout for example LinearLayout or FrameLayout or may be RelativeLayout. And then get your drawing cache from one of these parent and save that bitmap to SD.
Note : enable and disable the drawing cache on the layout accordingly. This is what i had done.
relativeLayoutBackground.setDrawingCacheEnabled(true);
relativeLayoutBackground.buildDrawingCache(true);
Bitmapbitmap= relativeLayoutBackground.getDrawingCache();
Post a Comment for "How To Save Multiple Imageviews As One Bitmap While Maintaining Position Of Each Imageview In Android?"