LayoutElementBuilders.ArcAdapter.Builder

public static final class LayoutElementBuilders.ArcAdapter.Builder
extends Object implements LayoutElementBuilders.ArcLayoutElement.Builder

java.lang.Object
   ↳ androidx.wear.tiles.builders.LayoutElementBuilders.ArcAdapter.Builder


Builder for LayoutElementBuilders.ArcAdapter.

Summary

Public methods

LayoutElementBuilders.ArcAdapter build()

Builds an instance with values accumulated in this Builder.

LayoutElementBuilders.ArcAdapter.Builder setContent(LayoutElementBuilders.LayoutElement content)

Sets the element to adapt to an LayoutElementBuilders.Arc.

LayoutElementBuilders.ArcAdapter.Builder setContent(LayoutElementBuilders.LayoutElement.Builder contentBuilder)

Sets the element to adapt to an LayoutElementBuilders.Arc.

LayoutElementBuilders.ArcAdapter.Builder setRotateContents(boolean rotateContents)

Sets whether this adapter's contents should be rotated, according to its position in the arc or not.

Inherited methods

Public methods

build

public LayoutElementBuilders.ArcAdapter build ()

Builds an instance with values accumulated in this Builder.

Returns
LayoutElementBuilders.ArcAdapter

setContent

public LayoutElementBuilders.ArcAdapter.Builder setContent (LayoutElementBuilders.LayoutElement content)

Sets the element to adapt to an LayoutElementBuilders.Arc.

Parameters
content LayoutElementBuilders.LayoutElement

Returns
LayoutElementBuilders.ArcAdapter.Builder

setContent

public LayoutElementBuilders.ArcAdapter.Builder setContent (LayoutElementBuilders.LayoutElement.Builder contentBuilder)

Sets the element to adapt to an LayoutElementBuilders.Arc.

Parameters
contentBuilder LayoutElementBuilders.LayoutElement.Builder

Returns
LayoutElementBuilders.ArcAdapter.Builder

setRotateContents

public LayoutElementBuilders.ArcAdapter.Builder setRotateContents (boolean rotateContents)

Sets whether this adapter's contents should be rotated, according to its position in the arc or not. As an example, assume that an LayoutElementBuilders.Image has been added to the arc, and ends up at the 3 o clock position. If rotate_contents = true, the image will be placed at the 3 o clock position, and will be rotated clockwise through 90 degrees. If rotate_contents = false, the image will be placed at the 3 o clock position, but itself will not be rotated. If not defined, defaults to false.

Parameters
rotateContents boolean

Returns
LayoutElementBuilders.ArcAdapter.Builder