8.7 released—WinterCG Compliance Part 1
Learn more
Base class for all views that supports children positioning.

Summary

Constructors

constructor

Properties

clipToBounds
isPassThroughParentEnabled
padding
paddingBottom
paddingLeft
paddingRight
paddingTop
154 properties inherited from CustomLayoutView
Click to expand

Methods

_registerLayoutChild
_unregisterLayoutChild
addChild
eachLayoutChild
getChildAt
getChildIndex
getChildrenCount
insertChild
removeChild
removeChildren
112 methods inherited from CustomLayoutView
Click to expand

Constructors

constructor

new LayoutBase(): LayoutBase

Properties

clipToBounds

clipToBounds: boolean
Gets or sets a value indicating whether to clip the content of this layout.

isPassThroughParentEnabled

isPassThroughParentEnabled: boolean
Gets or sets a value indicating whether touch event should pass through to a parent view of the layout container in case an interactive child view did not handle it. Default value of this property is false. This does not affect the appearance of the view.

padding

padding: string | number | LengthDipUnit | LengthPxUnit
Gets or sets padding style property.

paddingBottom

paddingBottom: LengthType
Specify the bottom padding of this layout.

paddingLeft

paddingLeft: LengthType
Specify the left padding of this layout.

paddingRight

paddingRight: LengthType
Specify the right padding of this layout.

paddingTop

paddingTop: LengthType
Specify the top padding of this layout.

Methods

_registerLayoutChild

_registerLayoutChild(child: View): void
INTERNAL. Used by the layout system.
Parameter Default Description
child

Returns void

_unregisterLayoutChild

_unregisterLayoutChild(child: View): void
INTERNAL. Used by the layout system.
Parameter Default Description
child

Returns void

addChild

addChild(view: View): void
Adds the view to children array.
Parameter Default Description
view

The view to be added to the end of the children array.

Returns void

eachLayoutChild

eachLayoutChild(callback: (child: View, isLast: boolean) => void): void
Calls the callback for each child that should be laid out.
Parameter Default Description
callback
(child: View, isLast: boolean) => void

The callback

Returns void

getChildAt

getChildAt(index: number): View
Returns the view at the specified position.
Parameter Default Description
index
number

The position at which to get the child from.

Returns View

getChildIndex

getChildIndex(child: View): number
Returns the position of the child view
Parameter Default Description
child

The child view that we are looking for.

Returns number

getChildrenCount

getChildrenCount(): number
Returns the number of children in this Layout.
Returns number

insertChild

insertChild(child: View, atIndex: number): void
Inserts the view to children array at the specified index.
Parameter Default Description
child

atIndex
number

The insertion index.

Returns void

removeChild

removeChild(view: View): void
Removes the specified view from the children array.
Parameter Default Description
view

The view to remove from the children array.

Returns void

removeChildren

removeChildren(): void
Removes all views in this layout.
Returns void
Previous
Label