LayoutElementBuilders.ExtensionLayoutElement


@RequiresSchemaVersion(major = 1, minor = 200)
@ExperimentalProtoLayoutExtensionApi
public final class LayoutElementBuilders.ExtensionLayoutElement implements LayoutElementBuilders.LayoutElement


A layout element which can be defined by a renderer extension. The payload in this message will be passed verbatim to any registered renderer extension in the renderer. It is then expected that the extension can parse this message, and emit the relevant element.

If a renderer extension is not installed, this resource will not render any element, although the specified space will still be occupied. If the payload cannot be parsed by the renderer extension, then still nothing should be rendered, although this behaviour is defined by the renderer extension.

Summary

Public methods

@NonNull String

Gets the ID of the renderer extension that should be used for rendering this layout element.

@Nullable DimensionBuilders.ExtensionDimension

Gets the height of this element.

@NonNull byte[]

Gets the content of the renderer extension element.

@Nullable DimensionBuilders.ExtensionDimension

Gets the width of this element.

@NonNull String

Public methods

getExtensionId

Added in 1.0.0
public @NonNull String getExtensionId()

Gets the ID of the renderer extension that should be used for rendering this layout element.

getHeight

Added in 1.0.0
public @Nullable DimensionBuilders.ExtensionDimension getHeight()

Gets the height of this element.

getPayload

Added in 1.0.0
public @NonNull byte[] getPayload()

Gets the content of the renderer extension element. This can be any data; it is expected that the renderer extension knows how to parse this field.

getWidth

Added in 1.0.0
public @Nullable DimensionBuilders.ExtensionDimension getWidth()

Gets the width of this element.

toString

public @NonNull String toString()