The second Android 11 Developer Preview is now available, test it out and share your feedback.

StackScope

class StackScope
kotlin.Any
   ↳ androidx.ui.layout.StackScope

A StackScope provides a scope for the children of a Stack.

Summary

Public constructors

A StackScope provides a scope for the children of a Stack.

Properties

ParentDataModifier

A layout modifier that defines that child should be positioned bottom-center inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned bottom-end inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned bottom-start inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned in the center of the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned center-end inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned center-start inside the Stack.

ParentDataModifier

A layout modifier within a Stack that makes the target component to occupy the whole space occupied by the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned top-center inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned top-end inside the Stack.

ParentDataModifier

A layout modifier that defines that child should be positioned top-start inside the Stack.

Public constructors

<init>

StackScope()

A StackScope provides a scope for the children of a Stack.

Properties

BottomCenter

val LayoutGravity.BottomCenter: ParentDataModifier

A layout modifier that defines that child should be positioned bottom-center inside the Stack. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

BottomEnd

val LayoutGravity.BottomEnd: ParentDataModifier

A layout modifier that defines that child should be positioned bottom-end inside the Stack. This resolves to bottom-right position for left-to-right layout direction, and bottom-left position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

BottomStart

val LayoutGravity.BottomStart: ParentDataModifier

A layout modifier that defines that child should be positioned bottom-start inside the Stack. This resolves to bottom-left position for left-to-right layout direction, and bottom-right position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

Center

val LayoutGravity.Center: ParentDataModifier

A layout modifier that defines that child should be positioned in the center of the Stack. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

CenterEnd

val LayoutGravity.CenterEnd: ParentDataModifier

A layout modifier that defines that child should be positioned center-end inside the Stack. This resolves to center-right position for left-to-right layout direction, and center-left position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

CenterStart

val LayoutGravity.CenterStart: ParentDataModifier

A layout modifier that defines that child should be positioned center-start inside the Stack. This resolves to center-left position for left-to-right layout direction, and center-right position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

Stretch

val LayoutGravity.Stretch: ParentDataModifier

A layout modifier within a Stack that makes the target component to occupy the whole space occupied by the Stack. Components using this layout modifier do not define the size of the Stack and are positioned within the stack after its size is calculated to wrap the non-stretch components.

TopCenter

val LayoutGravity.TopCenter: ParentDataModifier

A layout modifier that defines that child should be positioned top-center inside the Stack. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

TopEnd

val LayoutGravity.TopEnd: ParentDataModifier

A layout modifier that defines that child should be positioned top-end inside the Stack. This resolves to top-right position for left-to-right layout direction, and top-left position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.

TopStart

val LayoutGravity.TopStart: ParentDataModifier

A layout modifier that defines that child should be positioned top-start inside the Stack. This resolves to top-left position for left-to-right layout direction, and top-right position for right-to-left layout direction. If the Stack wraps its content (by not being constrained to a min size by its own parent), a child with this gravity option will contribute to the size of the Stack.