void android.view.
View.layout(int l, int t, int r, int b)
Assign a size and position to a view and all of its descendants
This is the second phase of the layout mechanism. (The first is measuring). In this phase, each parent calls layout on all of its children to position them. This is typically done using the child measurements that were stored in the measure pass().
Derived classes should not override this method. Derived classes with children should override onLayout. In that method, they should call layout on each of their children.
-
Parameters:
- l Left position, relative to parent
- t Top position, relative to parent
- r Right position, relative to parent
- b Bottom position, relative to parent
/**
* l Left position, relative to parent 控件左边 距离左边的距离
t Top position, relative to parent 控件上边距离上边的距离
r Right position, relative to parent 控件右边距离左边的距离
b Bottom position, relative to parent 控件下面距离上边的距离
*/