How do I convert my layout file into a bitmap image? I can take a screenshot of the current view but is there any way I can capture my layout file without changing the current view.
Asked
Active
Viewed 85 times
0
-
Hi Shashank, Welcome to SO . Check this post https://stackoverflow.com/questions/30196965/how-to-take-a-screenshot-of-current-activity-and-then-share-it and try it. – Swayangjit Oct 19 '19 at 14:00
-
I tried this but it only work for the current layout but I want to a screenshot of another layout. – Shasank Shahi Oct 19 '19 at 14:09
-
without changing the current view?? NO .. because it haven't drawn yet .. – ADM Oct 19 '19 at 14:54
-
@ADM then how about if I draw it temporarily on current activity and then change it back? – Shasank Shahi Oct 19 '19 at 15:01
-
@ShasankShahi See [this question](https://stackoverflow.com/questions/53181261/custom-view-component-is-not-showing-up-on-the-screenshot/53197087#53197087) for the basic approach. You do not have to change anything onscreen. – greeble31 Oct 19 '19 at 16:28