From the course: Complete Guide to Android Development with Kotlin for Beginners
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Get to know you
From the course: Complete Guide to Android Development with Kotlin for Beginners
Solution: Get to know you
(upbeat music) - [Instructor] Welcome back. Let's jump into my solution to the get to know you challenge. The first thing I did was create three variables. We needed one for the first name, favorite color, and then the favorite snack. I chose to create a string resource for my message. If we click here, you'll see I have high percent S as a placeholder for a string. Your favorite color is percent S, and your favorite snack is percent S. So that's it for my string placeholder. Coming back to the composable, I then have a column composable with a centered horizontal for our horizontal alignment. The next thing is pretty straightforward. We have our text fields. The first one is for the first name, and then I chose to put a little bit of space between my different composables, and I'm doing that here with the spacer composable. And then I have my favorite color, another space, and favorite snack. The final thing, which should be very familiar to you, is we have a button composable. Now…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Manage string values as resources3m 9s
-
(Locked)
Style the text in your app4m 5s
-
(Locked)
Manage data entry with TextField5m 43s
-
(Locked)
Use string resources with placeholders5m 49s
-
(Locked)
Display snackbar messages7m 50s
-
(Locked)
Challenge: Get to know you52s
-
(Locked)
Solution: Get to know you2m 18s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-