Get user input in an app
Create a tip calculator app by building the layout first, then implement the logic to calculate the tip from the user input. You’ll finish by adding polish to the app to create an even better user experience.
Welcome to Unit 2: Layouts
Learn about the two apps you’ll build in this unit to advance your knowledge about UI layouts in Android.
Tip calculator app introduction
Get a glimpse of the tip calculator app you’ll be building in this pathway.
Classes and inheritance in Kotlin
To build more complex apps, you’ll need to better understand how classes and inheritance work so that you can more fully use what the Android platform offers.
Create XML layouts for Android
Learn about new UI components, such as editable text fields, radio buttons, and switches to build up the layout for your tip calculator app. Instead of using the Layout Editor in Android Studio, you’ll be editing the layout for your app in XML.
Calculate the tip
Learn how to write Kotlin code to interact with the UI elements in the tip calculator app, so that you can calculate the tip. You’ll also learn how to handle edge cases in your app to make your app more robust.
Change the app theme
Choose colors for your app and apply them consistently throughout your app using themes.
Change the app icon
Change the launcher icon for your app with the help of the Image Asset Studio tool in Android Studio.
Create a more polished user experience
Update your tip calculator app to look more professional and polished by following Material Design guidelines and best practices for UI development.