Create the skeleton for the custom view.
- [Commentator] As previously mentioned, the main purpose…of our checkbox view is to support loading different…SVG icons that are specified through the XML file.…As the first step in creating our checkbox view,…let's go over to open our project view.…And we go into app, go into our package.…And we go into UI and select views.…And right mouse and select new Java class.…And we'll name our new class checkbox.…
Checkbox will inherit from app compat image view.…Now let's insert a line and we're going to add our…constructors.…First three constructors, now let's also add a method…called init view.…And we'll pass in context and attributes set.…
I'm going to close my project view here.…Now let's go and define our private method.…Init view.…I'm going to actually move it to the end of the file.…Init view is going to do a few things.…We need to call some framework methods, first one will be…set save enabled.…We'll set it to true.…
Next one is set layer type.…And we're going to set it to software.…And the paint object will be null.…
- 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.