Back to Blog
![]() Generally, a designer conveys more information about the design. Let's take another look at the design:īased on this screenshot alone, it would be quite difficult to implement this design in a pixel-perfect way. The first element to transform into a composable is the Search bar. By the end of the codelab, your new app will look like the provided design. Start with the lowest level composables and continue to combine these into more complex ones. Now that you've analyzed the design, you can start implementing composables for every identified piece of the UI. The "favorite collection" card that's shown in a horizontally scrollable grid.The "align your body" element that's shown in a horizontally scrollable row.Inside each section, you can also see some lower level components that are re-used: A section called "Favorite collections".At the highest abstraction level, we can break this design down into two pieces:ĭrilling down, the screen content contains three sub-parts: How can you split this UI into multiple reusable parts? Don't start coding straight away, but instead analyze the design itself. When you're asked to implement a design, a good way to start is by getting a clear understanding of its structure. We recommend that you start with the code in the main branch and follow the codelab step by step at your own pace. end – Contains the solution to this codelab.Make your changes here to complete the codelab. main – Contains the starter code for this project.The project is built in multiple git branches: BasicLayoutsCodelab - Project that contains the starter and finished code for this codelab.The compose-codelabs repo contains starter code for all codelabs in the pathway.įor this codelab, use the BasicLayoutsCodelab project. To complete this codelab, open the BasicLayoutsCodelab project inside Android Studio. The downloaded code contains code for all available Compose codelabs. To clone it, run: $ git clone Īlternatively, you can download two zip files: The code for this codelab can be found in the android-compose-codelabs Github repository. In this step, you download code that contains theming and some basic setup. ![]() It contains a section that lists your favorite collections, and a section with physical exercises. MySoothe is a well-being app that lists various ways to improve your body and mind. In this codelab, you implement a realistic app design based on mocks provided by a designer. Basic knowledge of what a composable is, and what modifiers are.If you haven't already, complete the Jetpack Compose basics codelab before starting this codelab. Experience with Kotlin syntax, including lambdas.Have Android Studio Chipmunk or later installed.How to build flexible composables using slot APIs.How Material composables like Scaffold and Bottom Navigation help you create comprehensive layouts.How alignments and arrangements change the position of child composables in their parent.How standard layout components like Column and LazyRow position child composables.How modifiers help you augment your composables.To learn about state and interaction instead, complete the State in Compose codelab instead.įor more support as you're walking through this codelab, check out the following code-along: What you'll learn This codelab does not add any actual behavior to the app. After finishing this codelab, you should be able to transform a basic app's design into working code. In this codelab you implement a more realistic and complex layout, learning about various out of the box composables and modifiers along the way. You also augmented these layouts with modifiers like padding, fillMaxWidth, and size. In the Basics codelab, you learned how to implement simple layouts using Surfaces, Rows and Columns. It assumes you understand the concepts taught in the basics codelab, so make sure that you complete that codelab first. This codelab teaches you how to write Compose UIs. You describe how you want your UI to look, and Compose takes care of drawing it on screen. Being a UI toolkit, Compose makes it easy to implement your app's designs.
0 Comments
Read More
Leave a Reply. |