LayoutStringUtil
public final class LayoutStringUtil
Summary
Public methods |
|
|---|---|
static final @NonNull TypeBuilders.StringLayoutConstraint |
@RequiresSchemaVersion(major = 1, minor = 200)Extension for creating a |
static final @NonNull LayoutString |
createLayoutString(@NonNull String receiver)Extension for creating a |
static final @NonNull LayoutString |
@RequiresSchemaVersion(major = 1, minor = 600)Extension for creating a |
static final @NonNull LayoutString |
@RequiresSchemaVersion(major = 1, minor = 200)Extension for creating a |
static final @NonNull TypeBuilders.StringLayoutConstraint |
@RequiresSchemaVersion(major = 1, minor = 200)Specifies layout constraints for to use for layout measurement in presence of dynamic values. |
Public methods
asLayoutConstraint
@RequiresSchemaVersion(major = 1, minor = 200)
public static final @NonNull TypeBuilders.StringLayoutConstraint asLayoutConstraint(@NonNull String receiver, int alignment)
Extension for creating a StringLayoutConstraint from a String. this will be used as longestPattern.
| Parameters | |
|---|---|
int alignment |
the alignment of the actual text within the space reserved by |
createLayoutString
public static final @NonNull LayoutString createLayoutString(@NonNull String receiver)
Extension for creating a LayoutString from a String.
createLayoutString
@RequiresSchemaVersion(major = 1, minor = 600)
public static final @NonNull LayoutString createLayoutString(
@NonNull DynamicBuilders.DynamicString receiver,
@NonNull String staticValue
)
Extension for creating a LayoutString from a DynamicString
createLayoutString
@RequiresSchemaVersion(major = 1, minor = 200)
public static final @NonNull LayoutString createLayoutString(
@NonNull DynamicBuilders.DynamicString receiver,
@NonNull String staticValue,
@NonNull TypeBuilders.StringLayoutConstraint layoutConstraint
)
Extension for creating a LayoutString from a DynamicString
| Parameters | |
|---|---|
@NonNull String staticValue |
the static value that can be used when the |
@NonNull TypeBuilders.StringLayoutConstraint layoutConstraint |
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 |
stringLayoutConstraint
@RequiresSchemaVersion(major = 1, minor = 200)
public static final @NonNull TypeBuilders.StringLayoutConstraint stringLayoutConstraint(@NonNull String longestPattern, int alignment)
Specifies layout constraints for to use for layout measurement in presence of dynamic values.
| Parameters | |
|---|---|
@NonNull String longestPattern |
the text string to use as the pattern for the (graphically) longest text that can be laid out. Used to ensure that the layout is of a known size during the layout pass. |
int alignment |
the alignment of the actual text within the space reserved by |