KaustubhPatange / kapture

A small library for Jetpack Compose to capture Composable content to Android Bitmap.
Apache License 2.0
14 stars 0 forks source link

Capture a scrollable screen compose #1

Open blackbirdsr71br opened 2 years ago

blackbirdsr71br commented 2 years ago

With this library i need to capture a scrollable screen, there are more object that not see, please

KaustubhPatange commented 2 years ago

This is not possible, Kapture only captures composables that are visible on the screen. Also, LazyColumn & LazyRow APIs are lazy in nature which means if the content is off-screen it is not rendered (just like a recycler in a RecyclerView).

The only solution I can suggest you to workaround this is first to capture the bitmap from the start of the scrolling list, then scroll down & capture the next bitmap. Repeat this till you reach the end of the scroll & later combine both the bitmap into a single bitmap.