Join Albert Lo for an in-depth discussion in this video Set up OnClick handlers, part of Android Development: Modern Android UI Design Elements.
- [Instructor] Let's finish off our implementation…of the side navigation drawer.…We will switch over to the main activity.…We got up to the onCreate.…There's a lot of initialization code here.…The plan is to create one method…to hold all of our view initialization code.…I'm going to highlight all of the code in here,…and cut it with Command X.…I'm going to scroll down near the bottom.…I'm going to add a new method called inflateViews,…it's a private method.…
And in here, I'm going to paste back the code that I cut,…with Command V.…InflateViews is a best practice to define a single method,…where all of the views for a given screen…will be initialized.…We can also get rid of the deprecation warning here,…by replacing setDrawerListener with addDrawerListener.…The default menu items for navigation view,…are no longer needed,…so we can also delete the setNavigationItemSelectedListener.…
At the bottom of inflateViews method,…we are going to add a new method…called setNavBarButtons.…With the nav bar item that we created in the previous video,…
- Creating a custom layout with XML
- Setting up OnClick handlers
- Making API calls
- Creating custom views
- Implementing ViewHolder objects
- Signing certificates
- Adding a checkbox
Skill Level Intermediate
Building Android Apps with Cloud Serviceswith Albert Lo2h 37m Intermediate
1. Understanding the Side Navigation Drawer
2. Custom RecyclerView: Multiple View Types
3. Custom RecyclerView: ViewHolders
4. Understanding Custom Views
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.