class EdgeContentLayout : LayoutElementBuilders.LayoutElement


ProtoLayout layout that represents the suggested layout style for Material ProtoLayout, which has content around the edge of the screen (e.g. a ProgressIndicator) and the given content inside of it with the recommended margin and padding applied. Optional primary or secondary label can be added above and below the additional content, respectively.

When accessing the contents of a container for testing, note that this element can't be simply casted back to the original type, i.e.:

EdgeContentLayout ecl = new EdgeContentLayout...
Box box = new Box.Builder().addContent(ecl).build();

EdgeContentLayout myEcl = (EdgeContentLayout) box.getContents().get(0);
will fail.

To be able to get EdgeContentLayout object from any layout element, fromLayoutElement method should be used, i.e.:

EdgeContentLayout myEcl =
  EdgeContentLayout.fromLayoutElement(box.getContents().get(0));

Summary

Nested types

Builder class for EdgeContentLayout.

Public functions

java-static EdgeContentLayout?

Returns EdgeContentLayout object from the given LayoutElement (e.g. one retrieved from a container's content with container.getContents().get(index)) if that element can be converted to EdgeContentLayout.

LayoutElementBuilders.LayoutElement?

Returns the inner content from this layout.

@Dimension(unit = Dimension.DP) Float

Get the size of spacing between content and secondary from this layout.

LayoutElementBuilders.LayoutElement?

Returns the edge content from this layout.

Float

Returns the total size of the edge content including margins.

LayoutElementBuilders.LayoutElement?

Get the primary label content from this layout.

LayoutElementBuilders.LayoutElement?

Get the secondary label content from this layout.

Boolean

Returns if the edge content has been placed behind the other contents.

Boolean

Returns whether the contents from this layout are using responsive inset.

Public functions

fromLayoutElement

Added in 1.0.0
java-static fun fromLayoutElement(element: LayoutElementBuilders.LayoutElement): EdgeContentLayout?

Returns EdgeContentLayout object from the given LayoutElement (e.g. one retrieved from a container's content with container.getContents().get(index)) if that element can be converted to EdgeContentLayout. Otherwise, it will return null.

getContent

Added in 1.0.0
fun getContent(): LayoutElementBuilders.LayoutElement?

Returns the inner content from this layout.

getContentAndSecondaryLabelSpacing

Added in 1.2.0-alpha01
fun getContentAndSecondaryLabelSpacing(): @Dimension(unit = Dimension.DP) Float

Get the size of spacing between content and secondary from this layout.

getEdgeContent

Added in 1.0.0
fun getEdgeContent(): LayoutElementBuilders.LayoutElement?

Returns the edge content from this layout.

getEdgeContentThickness

Added in 1.2.0-alpha01
fun getEdgeContentThickness(): Float

Returns the total size of the edge content including margins.

getPrimaryLabelTextContent

Added in 1.0.0
fun getPrimaryLabelTextContent(): LayoutElementBuilders.LayoutElement?

Get the primary label content from this layout.

getSecondaryLabelTextContent

Added in 1.0.0
fun getSecondaryLabelTextContent(): LayoutElementBuilders.LayoutElement?

Get the secondary label content from this layout.

isEdgeContentBehindAllOtherContent

Added in 1.1.0
fun isEdgeContentBehindAllOtherContent(): Boolean

Returns if the edge content has been placed behind the other contents.

isResponsiveContentInsetEnabled

Added in 1.2.0-alpha01
fun isResponsiveContentInsetEnabled(): Boolean

Returns whether the contents from this layout are using responsive inset.