Architecture Components
Learn about app architecture and how to use ViewModels, UI State, and StateFlow to build more complex apps.
Go back
Welcome to Unit 4
Welcome to Unit 4! This unit covers important topics for you to consider when building apps that have more logic and more screens. The unit includes: app architecture, navigation between different screens in an app, and adaptive layouts.
Stages of the Activity lifecycle
In this codelab, you learn about the Activity lifecycle and logging.
Intro to App architecture
Learn how to architect Android apps using design patterns, techniques, and best practices for Android app development.
Architecture: The UI Layer
In this video, you'll learn about the UI layer and how to use unidirectional data flow to handle UI state.
ViewModel and State in Compose
In this codelab, you learn how to use a ViewModel, one of the architecture components. You will implement a ViewModel to retain the app state during configuration changes.
Write unit tests to test the ViewModel
Learn how to test the ViewModel to verify the correctness, functional behavior, and usability of your app.
Practice: Add a ViewModel to Dessert Clicker
Practice adding a ViewModel to an app and abstracting logic away from the Activity.
What's next?
Congratulations on completing Pathway 1 in Unit 4! You have progressed amazingly in your app development journey. In this pathway you built both the Dessert Clicker and Unscramble apps and along the way you learned about the app lifecycle, handling configuration changes, and app architecture.