Menu items can be decorated with graphical icons to make them more visually interesting. In this video, learn how to create VectorDrawable icon files and display them in a menu.
- [Instructor] My application has a navigation drawer now … that I can view from sliding in from the side, … but it's visually very plain. … I'm going to describe how to add icons to menu items. … You can do this actually on the Options menu, … on the Nav menu, or on any other menu in Android, … but you'll frequently see them occur … on navigation drawer menus. … First, I'll need some graphics. … My menu has two items, for Settings and for About. … I'll create two new vector assets. … I'll use clip art for these … and so for the first one I'll search for settings … and I'll choose the gear icon. … I'll make sure my color is set to black … and I'll set the name of the file to IC_settings … and create it. … Then I'll do the same operation again. … Once again I'll use clip art and this time … I'm going to search for info … and I'll choose this version that has the black circle … and the white text. … And once again I'll make sure my color is set to black. … I'll set the name for this one to IC_about …
Looking for study partners?Join the Associate Android Developer Exam study group
The Android app architecture constantly evolves. The introduction of the Kotlin programming language, new form factors such as Chromebooks, and reusable architecture components have made it faster and easier than ever to build high-quality Android apps. It is imperative that developers understand what the latest tools and recommendations are and how to use them to build out their applications. In this course, instructor David Gassner explains how to build an Android app that uses Kotlin instead of Java, add navigation functionality, and leverage the most useful architecture components such as LifecycleObserver, ViewModel, and LiveData, to create apps that are robust and easy to maintain over time.
- Handling lifecycle events
- Handling view events
- Updating display from new data
- Adding ViewModels to activities
- Subscribing to changes in LiveData values
- Adding a new launcher activity
- Starting activities with explicit intents
- Sharing data with implicit intents
- Adding a navigation drawer
- Adding a header to a navigation drawer
- Handling navigating drawer menu events