The "On" colors are used for text and icons drawn on the different surfaces. Your theme doesn't need to specify all of them you will be choosing the primary and secondary colors, as well as the colors for text and icons drawn on those colors. To help you use color in a meaningful way in your app, and apply it consistently throughout, the theme system groups colors into 12 named attributes related to color to be used by text, icons, and more.
Learn about theme colorsĭifferent parts of the UI for Android apps use different colors. We will change the button's color to the color of the theme's primary color in future steps.
The app includes a TextView and Button to let you see what your color choices look like in an actual Android app. The app should look like the screenshot below.
It provides guidelines on how to build your app UI in a readable, attractive, and consistent manner.
Material Design is inspired by the physical world and its textures, including how objects reflect light and cast shadows. An internet connection to access the Material color tools.A computer with Android Studio version 4.1 or higher installed.Understand the importance of color contrast.Change the look of an app using a Theme.How to set colors as part of your app theme.How to select effective colors for your app according to Material Design principles.An Android device or emulator running API 28 (Android 9), or API 29 (Android 10) or higher.How to run an Android app on the emulator or a device in Android Studio.How to create an Android app from a template in Android Studio.If you're taking this as part of the Android Basics course, you can use the Tip Time app. The codelab uses the Empty Activity app template, but you can use whatever Android app you're working on.
The full Material system includes design guidelines on visual, motion, and interaction design for your app, but this codelab will focus on changing the color theme for your Android app. Material is a design system created by Google to help developers build high-quality digital experiences for Android and other platforms.