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

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