![twitter sunflower code twitter sunflower code](http://www.johnnyseeds.com/dw/image/v2/BBBW_PRD/on/demandware.static/-/Sites-jss-master/default/dw84a6c361/images/products/flowers/01307_01_sunbright.jpg)
Given a screen, you can have some parts migrated to Compose and others in the View system. In this case, you'll be doing Compose interop at the edges of those migrated features. If you need to build a new UI screen for your app, consider using Compose for it while the rest of the app might remain in the View system. Take an existing screen, and gradually migrate components of it.Ī common approach when refactoring your app to a new technology is adopting it in new features you build for your app.Develop a new screen entirely with Compose.There are many different ways to integrate Jetpack Compose into an existing Android app. Migrating to Compose depends on you and your team. Experience with Kotlin syntax, including lambdas.
TWITTER SUNFLOWER CODE HOW TO
How to test a screen with View system and Compose code.How you can use your theme from the View system in Compose.How to use an Android View from inside Compose.How to add Compose to an existing screen built using Android views.How to incrementally migrate an app to Compose.The different migration paths you can follow.We created a copy of the project for you to try out migrating a realistic app to Compose.īy the end of the codelab, you'll be able to continue with the migration and convert the rest of Sunflower's screens if you wish.įor more support as you're walking through this codelab, check out the following code-along: What you will learn In this codelab, you'll be migrating parts of the Sunflower's plant details screen to Compose. Compose and the View system can work together side by side.