Рет қаралды 353
From "Hello, World!" to a dynamic application! In this video, we build upon our previous lesson by adding user input to our simple Compose app. In doing so, we take a deep look into state and the Compose lifecycle.
Empty Project Starting Point:
github.com/MaxLangleyDev/Comp...
(Select the three dots on the right and click "download")
If you're having trouble setting up your project, you can follow my step-by-step project setup guide here: • Make Apps for Android,...
Watch the previous episode of my Compose beginners guide here:
• Beginner's Guide to Co...
Additional Reading:
developer.android.com/develop...
developer.android.com/develop...
Timestamps:
0:00 - Intro
0:25 - What is "State"?
0:52 - How to add state to our App
1:18 - Compose Lifecycle and Recomposition
2:25 - The "remember" Function
2:51 - The "mutableStateOf" Function
3:44 - User Input
3:57 - Adding An OutlinedTextField
5:22 - Adding A Button
6:35 - Adding Spacers to the Layout
7:30 - Running the App
7:46 - Checking the Layout Inspector
10:14 - Cleaning Up With The "by" Delegate
11:19 - Closing Thoughts (MVVM Teaser)