Sign in Go Pro

Custom Views and ViewGroups

Custom ViewGroups (Part 5): Implementing onLayout

 

Previous

About

In this lesson, we will implement the onLayout in our custom ViewGroup in order to assign a final position and size to its child views.
- How to calculate the bounding box of each child view as left, top, right, and bottom coordinates
- How to factor the padding, margins, and sizes of each child into each other's layout coordinates
- How to use the layout method to set the left, top, right, and bottom for each child view.

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Custom Views and ViewGroups