Join Albert Lo for an in-depth discussion in this video Implement GooglePhotosViewHolder, part of Android Development: Modern Android UI Design Elements.
- [Instructor] So, as previously mentioned,…Android Studio is flagging an error here…with the loadPhotos method, so let's go ahead and fix that.…We'll select loadPhotos method and press Control + B.…And we see that loadPhotos method has been declared private,…so let's just make that public.…Now, we switch back to AlbumViewHolders…and looks like everything's clean.…Now, we can go to AlbumGridAdapter…and we will create our GooglePhotosViewHolder.…
Let's uncomment this…and now let's select GooglePhotosViewHolder…and press on the light bulb.…Select Create class.…And, again, our class is going to be located…in the viewHolders package, so we will add viewHolders here…and select OK.…GooglePhotosViewHolder will be similar to AlbumViewHolder.…So, let's go into AlbumViewHolder…and we will copy these two lines to inflate our views…and initialize our image view.…
And we will paste it into here.…Let's also go to AlbumViewHolder…and we will copy our private class members…and paste it into here.…Now, let's add our setData method.…
- 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.