LayoutElementBuilders
class LayoutElementBuilders
Builders for composable layout elements that can be combined together to create renderable UI layouts.
Summary
Nested types |
|---|
|
An arc container. |
|
Builder for |
|
A container that allows a standard |
|
Builder for |
|
An extensible |
|
Builder for |
interface LayoutElementBuilders.ArcLayoutElementInterface defining the root of all elements that can be used in an |
|
Builder to create |
|
A line that can be used in an |
|
Builder for |
|
A simple spacer used to provide padding between adjacent elements in an |
|
Builder for |
|
A text element that can be used in an |
|
Builder for |
|
A container which stacks all of its children on top of one another. |
|
Builder for |
|
Filtering parameters used for images. |
|
Builder for |
|
A column of elements. |
|
Builder for |
|
An extensible |
|
Builder for |
|
The styling of a font (e.g. font size, and metrics). |
|
Builder for |
|
Font styles, currently set up to match Wear's font styling. |
|
An extensible |
|
Builder for |
|
An extensible |
|
Builder for |
|
An extensible |
|
Builder for |
|
An image. |
|
Builder for |
|
A complete layout. |
|
Builder for |
interface LayoutElementBuilders.LayoutElementInterface defining the root of all layout elements. |
|
Builder to create |
|
A row of elements. |
|
Builder for |
|
A simple spacer, typically used to provide padding between adjacent elements. |
|
Builder for |
interface LayoutElementBuilders.SpanInterface defining a single |
interface LayoutElementBuilders.Span.BuilderBuilder to create |
|
An image which can be added to a |
|
Builder for |
|
A portion of text which can be added to a |
|
Builder for |
|
An extensible |
|
Builder for |
|
A container of |
|
Builder for |
|
A text string. |
|
Builder for |
|
An extensible |
|
Builder for |
|
An extensible |
|
Builder for |
|
An extensible |
|
Builder for |
Constants |
|
|---|---|
const Int |
Anchor at the center of the elements. |
const Int |
ARC_ANCHOR_END = 3Anchor at the end of the elements. |
const Int |
ARC_ANCHOR_START = 1Anchor at the start of the elements. |
const Int |
Anchor position is undefined. |
const Int |
Content will be resized proportionally so it completely fills its bounds, and anything outside of the bounds will be cropped. |
const Int |
Content will be resized to fill its bounds, without taking into account the aspect ratio. |
const Int |
Content will be scaled to fit inside its bounds, proportionally. |
const Int |
Content scaling is undefined. |
const Int |
Font variant suited for body text. |
const Int |
Font variant suited for title text. |
const Int |
Font variant is undefined. |
const Int |
FONT_WEIGHT_BOLD = 700Bold font weight. |
const Int |
Medium font weight. |
const Int |
FONT_WEIGHT_NORMAL = 400Normal font weight. |
const Int |
Font weight is undefined. |
const Int |
Horizontally align to center. |
const Int |
Horizontally align to the content end (right in LTR layouts, left in RTL layouts). |
const Int |
Horizontally align to the left. |
const Int |
Horizontally align to the right. |
const Int |
Horizontally align to the content start (left in LTR layouts, right in RTL layouts). |
const Int |
Horizontal alignment is undefined. |
const Int |
Align to the bottom of the line (descent of the largest text in this line). |
const Int |
Align to the baseline of the text. |
const Int |
Alignment is undefined. |
const Int |
Align to the center of the |
const Int |
TEXT_ALIGN_END = 3Align to the "end" of the |
const Int |
TEXT_ALIGN_START = 1Align to the "start" of the |
const Int |
Alignment is undefined. |
const Int |
Truncate the text to fit in the |
const Int |
Truncate the text to fit inside of the |
const Int |
Overflow behavior is undefined. |
const Int |
Vertically align to the bottom. |
const Int |
Vertically align to center. |
const Int |
Vertically align to the top. |
const Int |
Vertical alignment is undefined. |
Constants
const val ARC_ANCHOR_CENTER = 2: Int
Anchor at the center of the elements. This will cause the center of the whole set of elements added to an arc to be pinned at the given anchor_angle.
const val ARC_ANCHOR_END = 3: Int
Anchor at the end of the elements. This will cause the set of elements inside the arc to end at the specified anchor_angle, i.e. all elements should be to the left of anchor_angle.
const val ARC_ANCHOR_START = 1: Int
Anchor at the start of the elements. This will cause elements added to an arc to begin at the given anchor_angle, and sweep around to the right.
const val CONTENT_SCALE_MODE_CROP = 2: Int
Content will be resized proportionally so it completely fills its bounds, and anything outside of the bounds will be cropped. As an example, if a 10x5 image was going to be drawn inside a 50x50 Image element, the image resource would be drawn as a 100x50 image, centered within its bounds (and with 25px cropped from both the left and right sides).
const val CONTENT_SCALE_MODE_FILL_BOUNDS = 3: Int
Content will be resized to fill its bounds, without taking into account the aspect ratio. If a 10x5 image was going to be drawn inside a 50x50 Image element, the image would be drawn as a 50x50 image, stretched vertically.
const val CONTENT_SCALE_MODE_FIT = 1: Int
Content will be scaled to fit inside its bounds, proportionally. As an example, If a 10x5 image was going to be drawn inside a 50x50 Image element, the actual image resource would be drawn as a 50x25 image, centered within the 50x50 bounds.
const val HORIZONTAL_ALIGN_END = 5: Int
Horizontally align to the content end (right in LTR layouts, left in RTL layouts).
const val HORIZONTAL_ALIGN_START = 4: Int
Horizontally align to the content start (left in LTR layouts, right in RTL layouts).
const val SPAN_VERTICAL_ALIGN_BOTTOM = 1: Int
Align to the bottom of the line (descent of the largest text in this line). If there is no text in the line containing this image, this will align to the bottom of the line, where the line height is defined as the height of the largest image in the line.
const val SPAN_VERTICAL_ALIGN_TEXT_BASELINE = 2: Int
Align to the baseline of the text. Note that if the line in the Spannable which contains this image does not contain any text, the effects of using this alignment are undefined.
const val TEXT_ALIGN_CENTER = 2: Int
Align to the center of the androidx.wear.tiles.LayoutElementBuilders.Text element.
const val TEXT_ALIGN_END = 3: Int
Align to the "end" of the androidx.wear.tiles.LayoutElementBuilders.Text element (right in LTR layouts, left in RTL layouts).
const val TEXT_ALIGN_START = 1: Int
Align to the "start" of the androidx.wear.tiles.LayoutElementBuilders.Text element (left in LTR layouts, right in RTL layouts).
const val TEXT_OVERFLOW_ELLIPSIZE_END = 2: Int
Truncate the text to fit in the Text element's bounds, but add an ellipsis (i.e. ...) to the end of the text if it has been truncated.
const val TEXT_OVERFLOW_TRUNCATE = 1: Int
Truncate the text to fit inside of the Text element's bounds. If text is truncated, it will be truncated on a word boundary.