class LayoutString


Static or dynamic string value for layout fields.

This can be used on layout string fields with data binding support.

Summary

Public constructors

LayoutString(staticValue: String)

Creates an instance for a static String value.

@RequiresSchemaVersion(major = 1, minor = 200)
LayoutString(
    staticValue: String,
    dynamicValue: DynamicBuilders.DynamicString,
    layoutConstraint: TypeBuilders.StringLayoutConstraint
)

Creates an instance for a DynamicString value with a static value fallback and a set of layout constraints for the dynamic value.

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

DynamicBuilders.DynamicString?

The dynamic value.

TypeBuilders.StringLayoutConstraint?

When dynamicValue is used, this allows correctly measuring layout Text element size and aligning text to ensure that the layout is of a known size during the layout pass regardless of the dynamicValue String.

String

The static value.

Public constructors

LayoutString

Added in 1.3.0-alpha05
LayoutString(staticValue: String)

Creates an instance for a static String value.

LayoutString

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 200)
LayoutString(
    staticValue: String,
    dynamicValue: DynamicBuilders.DynamicString,
    layoutConstraint: TypeBuilders.StringLayoutConstraint
)

Creates an instance for a DynamicString value with a static value fallback and a set of layout constraints for the dynamic value.

Parameters
staticValue: String

the static value that can be used when the dynamicValue can't be resolved.

dynamicValue: DynamicBuilders.DynamicString

the dynamic value. If this value can be resolved, the staticValue won't be used.

layoutConstraint: TypeBuilders.StringLayoutConstraint

used to correctly measure layout Text element size and align text to ensure that the layout is of a known size during the layout pass regardless of the dynamicValue String.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

dynamicValue

Added in 1.3.0-alpha05
val dynamicValueDynamicBuilders.DynamicString?

The dynamic value. If this can't be resolved staticValue will be used during rendering.

layoutConstraint

Added in 1.3.0-alpha05
val layoutConstraintTypeBuilders.StringLayoutConstraint?

When dynamicValue is used, this allows correctly measuring layout Text element size and aligning text to ensure that the layout is of a known size during the layout pass regardless of the dynamicValue String.

staticValue

Added in 1.3.0-alpha05
val staticValueString

The static value. If dynamicValue is not null this will be used as the default value for when dynamicValue can't be resolved.