onLayout

protected open fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)

Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.

╔═══════════╗
║┌─────────┐║paddingTop
║│╔═══════╗│║topMargin
║│║ Shift ║│║
║│╚═══════╝│║bottomMargin
╟┼─────────┼╢Split_1
║│╔═══════╗│║topMargin
║│║Button ║│║
║│╚═══════╝│║bottomMargin
╟┼─────────┼╢Split_2
║│╔═══════╗│║topMargin
║│║ Alpha ║│║
║│╚═══════╝│║bottomMargin
║└─────────┘║paddingBottom
╚═══════════╝

Parameters

changed

This is a new size or position for this view

left

Left position, relative to parent

top

Top position, relative to parent

right

Right position, relative to parent

bottom

Bottom position, relative to parent