Support for Compose Animation #788
Answered
by
geoff-powell
basimsherif
asked this question in
Q&A
|
How can we generate snapshots for a Composable with Animation? Looks like Paparazzi is not waiting for Animation to start even with putting some delay() and LaunchedEffect in test. This makes Composable hidden in the screenshot taken. |
Answered by
geoff-powell
Nov 21, 2024
Replies: 2 comments
|
You can capture animations by using |
0 replies
Answer selected by
geoff-powell
|
I couldn't find a val paparazzi = // Initialize Paparazzi...
val context = RenderAction.getCurrentContext()
val hostView = ComposeView(context).apply {
layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
}
hostView.setContent { MyCoolComposable() }
paparazzi.gif(hostView) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can capture animations by using
paparazzi.gifto generate an APNG of said composable animation.