List of sessions - / droidkaigi
From Android View to Jetpack Compose: A Guide to Migration (syarihu)
With Android Views in maintenance mode and Jetpack Compose having been officially released for about three years, the adoption of Jetpack Compose is on the rise. However, for apps with a long history, the transition from Android Views may be slow due to resource constraints or other factors.
While Jetpack Compose is easy to introduce, the flexibility in coding style can lead to questions when developing in a team: What rules should we establish? How should we divide Composables? How should we pass arguments to Composable functions? To what extent should we write previews?
At mikan Co., Ltd., where I've been helping out as a contractor, we've been working on Jetpack Compose adoption for some time. After some trial and error, we've established guidelines on coding styles and rules.
This session will cover mikan's approach to Jetpack Compose migration, using a real-world migration task as an example. We'll demonstrate how to implement layouts using Jetpack Compose, how to leverage previews to reproduce screen behavior close to the actual operation, and more.
Agenda:
■ Introducing Jetpack Compose
Adding Jetpack Compose dependencies
Deciding where to place Compose-related files
Establishing naming conventions for files, Composable functions, etc.
Designing for previews that can display not only components but entire screens
■ Migrating to Jetpack Compose: Transitioning an onboarding screen to Jetpack Compose (The example screen may change)
Examining the layout of the screen
Dividing the screen's layout into component units
Identifying tasks required for migration
Implementing the UI
Defining UiState
Using Previews to achieve screen behavior close to the actual operation
Implementing logic
Combining the screen and logic
(Translated by the DroidKaigi Committee)
DroidKaigi 2024 Session timetable/Slide link - https://2024.droidkaigi.jp/en/timetab...
---------
DroidKaigi is a conference tailored for Android developers. It took place on the 11, 12, and 13 of September 2024.
All participants at DroidKaigi are required to agree with the DroidKaigi Code of Conduct.
This will be enforced on social media and YouTube comments and chats as well:
https://portal.droidkaigi.jp/en/about...
DroidKaigi 2024 and more - https://2024.droidkaigi.jp/
DroidKaigi on X - / droidkaigi
#Android #DroidKaigi
----
The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.