GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeObjectPositioning - Android

BlazeObjectPositioning defines the horizontal and vertical position of an object within a container. Use it to position UI elements such as titles and indicators inside a widget item.

Properties

xPosition

var xPosition: BlazeObjectXPosition

The horizontal position of the object. See BlazeObjectXPosition below.

yPosition

var yPosition: BlazeObjectYPosition

The vertical position of the object. See BlazeObjectYPosition below.

BlazeObjectXPosition

The BlazeObjectXPosition enum defines the horizontal position of an object relative to a sibling object's start, end, or center axis.

Cases

ValueDescription
START_TO_STARTAligns the start edge of the object to the start edge of the second element.
START_TO_ENDAligns the start edge of the object to the end edge of the second element.
END_TO_STARTAligns the end edge of the object to the start edge of the second element.
END_TO_ENDAligns the end edge of the object to the end edge of the second element.
CENTER_XAligns the center of the object with the center of the second element along the x-axis.
CENTER_TO_STARTAligns the center of the object to the start edge of the second element.
CENTER_TO_ENDAligns the center of the object to the end edge of the second element.

BlazeObjectYPosition

The BlazeObjectYPosition enum defines the vertical position of an object relative to a sibling object's top, bottom, or center axis.

Cases

ValueDescription
BOTTOM_TO_TOPAligns the bottom edge of the object to the top edge of the second element.
TOP_TO_TOPAligns the top edge of the object to the top edge of the second element.
BOTTOM_TO_BOTTOMAligns the bottom edge of the object to the bottom edge of the second element.
TOP_TO_BOTTOMAligns the top edge of the object to the bottom edge of the second element.
CENTER_TO_TOPAligns the center of the object to the top edge of the second element.
CENTER_YAligns the center of the object with the center of the second element along the y-axis.
CENTER_TO_BOTTOMAligns the center of the object to the bottom edge of the second element.

Did this page help you?