https://kotlinlang.org logo
#compose
Title
# compose
m

Mayank Wadhwa

02/25/2021, 1:39 PM
Hi everyone, Can someone help me with taking a screenshot in jetpack compose scrollable column such that the result image contains the invisible part of the screen as well.?
s

Se7eN

02/25/2021, 2:01 PM
What invisble part?
You mean you want to screenshot the whole list?
h

Halil Ozercan

02/25/2021, 2:08 PM
My hack was basically wrapping the whole thing in a FrameLayout with the help of
AndroidView
, and then taking regular "View screenshot" of that FrameLayout
Ofc, this doesn't work with composables that take advantage of Subcomposition, like LazyColumn, etc.
j

Johan Reitan

02/25/2021, 2:39 PM
If a preview is enough for you, you could configure the preview to be as high as you need, then right click it and copy
c

Colton Idle

02/25/2021, 3:24 PM
Android 12 apparently has built in support for scrolling screenshots if that satisfies your requirements.
p

Piotr Prus

03/05/2021, 1:12 PM
is there a possibility to make a bitmap in running app, so it could be shared?
3 Views