LayoutElementBuilders

public final class LayoutElementBuilders


Builders for composable layout elements that can be combined together to create renderable UI layouts.

Summary

Nested types

LayoutElementBuilders.Arc

An arc container.

LayoutElementBuilders.Arc.Builder

Builder for Arc.

LayoutElementBuilders.ArcAdapter

A container that allows a standard LayoutElement to be added to an Arc.

LayoutElementBuilders.ArcAdapter.Builder

Builder for ArcAdapter.

LayoutElementBuilders.ArcAnchorTypeProp

An extensible {@code ArcAnchorType} property.

LayoutElementBuilders.ArcAnchorTypeProp.Builder

Builder for ArcAnchorTypeProp

LayoutElementBuilders.ArcLayoutElement

Interface defining the root of all elements that can be used in an Arc.

LayoutElementBuilders.ArcLayoutElement.Builder

Builder to create ArcLayoutElement objects.

LayoutElementBuilders.ArcLine

A line that can be used in an Arc and renders as a round progress bar.

LayoutElementBuilders.ArcLine.Builder

Builder for ArcLine.

LayoutElementBuilders.ArcSpacer

A simple spacer used to provide padding between adjacent elements in an Arc.

LayoutElementBuilders.ArcSpacer.Builder

Builder for ArcSpacer.

LayoutElementBuilders.ArcText

A text element that can be used in an Arc.

LayoutElementBuilders.ArcText.Builder

Builder for ArcText.

LayoutElementBuilders.Box

A container which stacks all of its children on top of one another.

LayoutElementBuilders.Box.Builder

Builder for Box.

LayoutElementBuilders.ColorFilter

Filtering parameters used for images.

LayoutElementBuilders.ColorFilter.Builder

Builder for ColorFilter

LayoutElementBuilders.Column

A column of elements.

LayoutElementBuilders.Column.Builder

Builder for Column.

LayoutElementBuilders.ContentScaleModeProp

An extensible {@code ContentScaleMode} property.

LayoutElementBuilders.ContentScaleModeProp.Builder

Builder for ContentScaleModeProp

LayoutElementBuilders.FontStyle

The styling of a font (e.g.

LayoutElementBuilders.FontStyle.Builder

Builder for FontStyle

LayoutElementBuilders.FontStyles

Font styles, currently set up to match Wear's font styling.

LayoutElementBuilders.FontVariantProp

An extensible {@code FontVariant} property.

LayoutElementBuilders.FontVariantProp.Builder

Builder for FontVariantProp

LayoutElementBuilders.FontWeightProp

An extensible {@code FontWeight} property.

LayoutElementBuilders.FontWeightProp.Builder

Builder for FontWeightProp

LayoutElementBuilders.HorizontalAlignmentProp

An extensible {@code HorizontalAlignment} property.

LayoutElementBuilders.HorizontalAlignmentProp.Builder

Builder for HorizontalAlignmentProp

LayoutElementBuilders.Image

An image.

LayoutElementBuilders.Image.Builder

Builder for Image.

LayoutElementBuilders.Layout

A complete layout.

LayoutElementBuilders.Layout.Builder

Builder for Layout

LayoutElementBuilders.LayoutElement

Interface defining the root of all layout elements.

LayoutElementBuilders.LayoutElement.Builder

Builder to create LayoutElement objects.

LayoutElementBuilders.Row

A row of elements.

LayoutElementBuilders.Row.Builder

Builder for Row.

LayoutElementBuilders.Spacer

A simple spacer, typically used to provide padding between adjacent elements.

LayoutElementBuilders.Spacer.Builder

Builder for Spacer.

LayoutElementBuilders.Span

Interface defining a single Span.

LayoutElementBuilders.Span.Builder

Builder to create Span objects.

LayoutElementBuilders.SpanImage

An image which can be added to a Span.

LayoutElementBuilders.SpanImage.Builder

Builder for SpanImage.

LayoutElementBuilders.SpanText

A portion of text which can be added to a Span.

LayoutElementBuilders.SpanText.Builder

Builder for SpanText.

LayoutElementBuilders.SpanVerticalAlignmentProp

An extensible {@code SpanVerticalAlignment} property.

LayoutElementBuilders.SpanVerticalAlignmentProp.Builder

Builder for SpanVerticalAlignmentProp

LayoutElementBuilders.Spannable

A container of Span elements.

LayoutElementBuilders.Spannable.Builder

Builder for Spannable.

LayoutElementBuilders.Text

A text string.

LayoutElementBuilders.Text.Builder

Builder for Text.

LayoutElementBuilders.TextAlignmentProp

An extensible {@code TextAlignment} property.

LayoutElementBuilders.TextAlignmentProp.Builder

Builder for TextAlignmentProp

LayoutElementBuilders.TextOverflowProp

An extensible {@code TextOverflow} property.

LayoutElementBuilders.TextOverflowProp.Builder

Builder for TextOverflowProp

LayoutElementBuilders.VerticalAlignmentProp

An extensible {@code VerticalAlignment} property.

LayoutElementBuilders.VerticalAlignmentProp.Builder

Builder for VerticalAlignmentProp

Constants

static final @NonNull int

Anchor at the center of the elements.

static final @NonNull int

Anchor at the end of the elements.

static final @NonNull int

Anchor at the start of the elements.

static final @NonNull int

Anchor position is undefined.

static final @NonNull int

Content will be resized proportionally so it completely fills its bounds, and anything outside of the bounds will be cropped.

static final @NonNull int

Content will be resized to fill its bounds, without taking into account the aspect ratio.

static final @NonNull int

Content will be scaled to fit inside its bounds, proportionally.

static final @NonNull int

Content scaling is undefined.

static final @NonNull int

Font variant suited for body text.

static final @NonNull int

Font variant suited for title text.

static final @NonNull int

Font variant is undefined.

static final @NonNull int

Bold font weight.

static final @TilesExperimental @NonNull int

Medium font weight.

static final @NonNull int

Normal font weight.

static final @NonNull int

Font weight is undefined.

static final @NonNull int

Horizontally align to center.

static final @NonNull int

Horizontally align to the content end (right in LTR layouts, left in RTL layouts).

static final @NonNull int

Horizontally align to the left.

static final @NonNull int

Horizontally align to the right.

static final @NonNull int

Horizontally align to the content start (left in LTR layouts, right in RTL layouts).

static final @NonNull int

Horizontal alignment is undefined.

static final @NonNull int

Align to the bottom of the line (descent of the largest text in this line).

static final @NonNull int

Align to the baseline of the text.

static final @NonNull int

Alignment is undefined.

static final @NonNull int

Align to the center of the Text element.

static final @NonNull int

Align to the "end" of the Text element (right in LTR layouts, left in RTL layouts).

static final @NonNull int

Align to the "start" of the Text element (left in LTR layouts, right in RTL layouts).

static final @NonNull int

Alignment is undefined.

static final @NonNull int

Truncate the text to fit in the Text element's bounds, but add an ellipsis (i.e.

static final @NonNull int

Truncate the text to fit inside of the Text element's bounds.

static final @NonNull int

Overflow behavior is undefined.

static final @NonNull int

Vertically align to the bottom.

static final @NonNull int

Vertically align to center.

static final @NonNull int

Vertically align to the top.

static final @NonNull int

Vertical alignment is undefined.

Constants

ARC_ANCHOR_CENTER

@NonNull
public static final @NonNull int ARC_ANCHOR_CENTER

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.

ARC_ANCHOR_END

@NonNull
public static final @NonNull int ARC_ANCHOR_END

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.

ARC_ANCHOR_START

@NonNull
public static final @NonNull int ARC_ANCHOR_START

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.

ARC_ANCHOR_UNDEFINED

@NonNull
public static final @NonNull int ARC_ANCHOR_UNDEFINED

Anchor position is undefined.

CONTENT_SCALE_MODE_CROP

@NonNull
public static final @NonNull int CONTENT_SCALE_MODE_CROP

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).

CONTENT_SCALE_MODE_FILL_BOUNDS

@NonNull
public static final @NonNull int CONTENT_SCALE_MODE_FILL_BOUNDS

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.

CONTENT_SCALE_MODE_FIT

@NonNull
public static final @NonNull int CONTENT_SCALE_MODE_FIT

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.

CONTENT_SCALE_MODE_UNDEFINED

@NonNull
public static final @NonNull int CONTENT_SCALE_MODE_UNDEFINED

Content scaling is undefined.

FONT_VARIANT_BODY

@NonNull
public static final @NonNull int FONT_VARIANT_BODY

Font variant suited for body text.

FONT_VARIANT_TITLE

@NonNull
public static final @NonNull int FONT_VARIANT_TITLE

Font variant suited for title text.

FONT_VARIANT_UNDEFINED

@NonNull
public static final @NonNull int FONT_VARIANT_UNDEFINED

Font variant is undefined.

FONT_WEIGHT_BOLD

@NonNull
public static final @NonNull int FONT_WEIGHT_BOLD

Bold font weight.

FONT_WEIGHT_MEDIUM

@TilesExperimental
@NonNull
public static final @TilesExperimental @NonNull int FONT_WEIGHT_MEDIUM

Medium font weight.