Create GridPhotoItem POJO that supports multiple view types.
- [Instructor] Next, let's define the model.…In my opinion, this is the most interesting part…of the RecyclerView.…Every RecyclerView adapter has a model.…Like all models, the RecyclerView model…has no dependencies on the Android framework.…So it will be easy to implement and test.…Our model will have two parts to it.…The first one is the GooglePhotosItem,…and this will contain the backing data…for our RecyclerView adapter.…
The other one will be the GooglePhotosItemManager,…and this will provide methods…to access and manage our Google Photos items.…So let's go ahead and create our GooglePhotosItem.…I'm going to press Command + 1…to open the Android project view,…and we're going to go into app,…go into our package, and under models,…we are going to create a new model,…and we're going to call it GooglePhotosItem.…
Our GooglePhotosItem is purely a POJO,…plain old Java object.…Our GooglePhotosItem will contain an enum,…which will define the itemType.…So let's go ahead and create our enum here,…and we're going to call it ItemType.…
- 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.