Reputation: 21
How to take a screenshot of layout underneath by making the layout transparent .I have tried that but it only gives the screenshot of views available inside the layout.Is it possible to do that.Because I am using the layout with windowManager
in service.
Upvotes: 1
Views: 95
Reputation: 1586
Bitmap bitmapToShare = Bitmap.createBitmap(layoutToShare.getWidth(),layoutToShare.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmapToShare);
layoutToShare.draw(canvas);
And You have bitmap from your layout.
Upvotes: 2