Join Albert Lo for an in-depth discussion in this video Implement SquareLayout, part of Android Development: Modern Android UI Design Elements.
- [Narrator] We are almost ready to create our view holders.…But before we do that, let's first create…a custom view that will be used by the view holders,…and that is custom view for a square layout.…Let's open our Android Project View with command-one,…and we select Views, right mouse,…and we create a new Java class,…and we will call this new class SquareRelativeLayout.…SquareRelativeLayout will inherit from RelativeLayout,…so let's enter that here.…
Press OK.…Now we press control-O, and we will add our constructors.…Let's select the first three, for our constructors.…Now let's scroll down and we are going to add…a method called onMeasure.…This is a standard framework method provided by All Views.…A protected method, onMeasure takes two parameters.…
The first is a widthMeasureSpec,…and the other is a heightMeasureSpec.…I'm going to press command-one…to dismiss the Android Project View.…In our onMeasure method, we will need to declare…some local variables first, so let's go ahead and do that.…I'm going to declare widthMode…
- 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.