Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I get a picture from a whole lazyVerticalGrid? #171

Open
yuqingweng opened this issue May 6, 2024 · 2 comments
Open

Can I get a picture from a whole lazyVerticalGrid? #171

yuqingweng opened this issue May 6, 2024 · 2 comments

Comments

@yuqingweng
Copy link

when i use captureAsync,i only get the first page, not a whole page
LazyVerticalGrid(modifier = Modifier.capturable(captureController)){}

@PatilShreyas
Copy link
Owner

I think in your case whole page might not have been rendered. Since it's lazy. Will check this.

@ssttkkl
Copy link

ssttkkl commented Oct 4, 2024

My workround:

Before you want to capture your LazyColumn, use a Box wrapping your LazyColumn with a very large requiredHeight. After UI recomposed and drawn, you can capture the whole LazyColumn.

Please check my implementation:
https://github.com/ssttkkl/mahjong-utils-app/blob/main/composeApp/src/commonMain/kotlin/io/ssttkkl/mahjongutils/app/components/capturablelazy/LazyCapturableColumn.kt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants