Compose support
See original GitHub issueI took a stab at getting a ComposeView working with Paparazzi. It doesn’t work with 0.7.0, but I managed to get it working on the native layoutlib branch with a bit of hackery. I think most of this is solved by using native/newer layoutlib, but It’d be great if there was a built-in paparazzi.snapshot(content: @Composable () -> Unit)
at some point
- Compose calls ViewTreeLifecycleOwner/ViewTreeSavedStateRegistryOwner.get(rootView). A workaround for now is to wrap the ComposeView in a FrameLayout which sets these on the root view in onAttachedToWindow
- I had to provide mocked versions of AutofillManager and ClipboardManager as the 4.1.0 layoutlib doesn’t provide them from BridgeContext, and Compose looks them both up when initialising. It looks like the latest prebuilt from mirror-goog-studio-master-dev does, but I can’t get past an unsatisfiedlinkerror when trying to use it. Pre-releases of studio aren’t tagged, so I have no idea whether the 4.2.0 version has support for these or not…
Issue Analytics
- State:
- Created 2 years ago
- Reactions:37
- Comments:7
Top Results From Across the Web
Compose Help
Compose Database-as-a-Service Help and Documentation · Compose Hosted · Compose Enterprise · Accounts & Billing · Security and Compliance · Support · Essentials....
Read more >Jetpack Compose UI App Development Toolkit
Powerful. Create beautiful apps with direct access to the Android platform APIs and built-in support for Material Design, Dark theme, animations, and more....
Read more >Introducing Jetpack Compose Support - PSPDFKit
The Android PDF SDK you know and love now supports Jetpack Compose! ... Unveiling Jetpack Compose support as part of the 8.0 release...
Read more >compose - platform/frameworks/support - Git at Google
Syntax. Jetpack Compose uses composable functions instead of XML layouts to define UI components. You can see this in action in the demos,...
Read more >Docker Compose release notes
Added support for windows/arm64 and linux/riscv64. Updates . Updated Dockerfile syntax to latest stable and renamed docs Dockerfile. Dependencies update: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For posterity, here are the hacks I used to get this to work with
0.8.0
: https://gist.github.com/ncipollo/5d34ef0f533dbbad01fe6af932240bf6@timrijckaert apologies, but WIP branches aren’t ready for support 😉
On the CashApp team, we’re using the commit you referenced internally and it seems to be working fine. If i had to guess, maybe your compileSdk is 31 which Paparazzi/Layoutlib doesn’t yet support as of https://github.com/cashapp/paparazzi/issues/264.