public interface

LayoutElementProto.SpannableOrBuilder

 androidx.wear.protolayout.proto.LayoutElementProto.SpannableOrBuilder

Subclasses:

LayoutElementProto.Spannable, LayoutElementProto.Spannable.Builder

Summary

Methods
public DimensionProto.SpPropgetLineHeight()

 The explicit height between lines of text.

public DimensionProto.SpPropgetLineSpacing()

 Extra spacing to add between each line.

public LayoutElementProto.MarqueeParametersgetMarqueeParameters()

 Parameters for Marquee animation.

public TypesProto.Int32PropgetMaxLines()

 The maximum number of lines that can be represented by the Spannable
 element.

public ModifiersProto.ModifiersgetModifiers()

 Modifiers for this element.

public AlignmentProto.HorizontalAlignmentPropgetMultilineAlignment()

 Alignment of the Spannable content within its bounds.

public LayoutElementProto.TextOverflowPropgetOverflow()

 How to handle content which overflows the bound of the Spannable element.

public LayoutElementProto.SpangetSpans(int index)

 The Span elements that form this Spannable.

public intgetSpansCount()

 The Span elements that form this Spannable.

public java.util.List<LayoutElementProto.Span>getSpansList()

 The Span elements that form this Spannable.

public booleanhasLineHeight()

 The explicit height between lines of text.

public booleanhasLineSpacing()

 Extra spacing to add between each line.

public booleanhasMarqueeParameters()

 Parameters for Marquee animation.

public booleanhasMaxLines()

 The maximum number of lines that can be represented by the Spannable
 element.

public booleanhasModifiers()

 Modifiers for this element.

public booleanhasMultilineAlignment()

 Alignment of the Spannable content within its bounds.

public booleanhasOverflow()

 How to handle content which overflows the bound of the Spannable element.

Methods

public java.util.List<LayoutElementProto.Span> getSpansList()

 The Span elements that form this Spannable.
 
repeated .androidx.wear.protolayout.proto.Span spans = 1;

public LayoutElementProto.Span getSpans(int index)

 The Span elements that form this Spannable.
 
repeated .androidx.wear.protolayout.proto.Span spans = 1;

public int getSpansCount()

 The Span elements that form this Spannable.
 
repeated .androidx.wear.protolayout.proto.Span spans = 1;

public boolean hasModifiers()

 Modifiers for this element.
 
.androidx.wear.protolayout.proto.Modifiers modifiers = 2;

Returns:

Whether the modifiers field is set.

public ModifiersProto.Modifiers getModifiers()

 Modifiers for this element.
 
.androidx.wear.protolayout.proto.Modifiers modifiers = 2;

Returns:

The modifiers.

public boolean hasMaxLines()

 The maximum number of lines that can be represented by the Spannable
 element. If not defined, the Spannable element will be treated as a
 single-line element.
 
.androidx.wear.protolayout.proto.Int32Prop max_lines = 3;

Returns:

Whether the maxLines field is set.

public TypesProto.Int32Prop getMaxLines()

 The maximum number of lines that can be represented by the Spannable
 element. If not defined, the Spannable element will be treated as a
 single-line element.
 
.androidx.wear.protolayout.proto.Int32Prop max_lines = 3;

Returns:

The maxLines.

public boolean hasMultilineAlignment()

 Alignment of the Spannable content within its bounds. Note that a Spannable
 element will size itself to wrap its contents, so this option is
 meaningless for single-line content (for that, use alignment of the outer
 container). For multi-line content, however, this will set the alignment of
 lines relative to the Spannable element bounds. If not defined, defaults to
 TEXT_ALIGN_CENTER.
 
.androidx.wear.protolayout.proto.HorizontalAlignmentProp multiline_alignment = 4;

Returns:

Whether the multilineAlignment field is set.

public AlignmentProto.HorizontalAlignmentProp getMultilineAlignment()

 Alignment of the Spannable content within its bounds. Note that a Spannable
 element will size itself to wrap its contents, so this option is
 meaningless for single-line content (for that, use alignment of the outer
 container). For multi-line content, however, this will set the alignment of
 lines relative to the Spannable element bounds. If not defined, defaults to
 TEXT_ALIGN_CENTER.
 
.androidx.wear.protolayout.proto.HorizontalAlignmentProp multiline_alignment = 4;

Returns:

The multilineAlignment.

public boolean hasOverflow()

 How to handle content which overflows the bound of the Spannable element.
 A Spannable element will grow as large as possible inside its parent
 container (while still respecting max_lines); if it cannot grow large
 enough to render all of its content, the content which cannot fit inside
 its container will  be truncated. If not defined, defaults to
 TEXT_OVERFLOW_TRUNCATE.
 
.androidx.wear.protolayout.proto.TextOverflowProp overflow = 5;

Returns:

Whether the overflow field is set.

 How to handle content which overflows the bound of the Spannable element.
 A Spannable element will grow as large as possible inside its parent
 container (while still respecting max_lines); if it cannot grow large
 enough to render all of its content, the content which cannot fit inside
 its container will  be truncated. If not defined, defaults to
 TEXT_OVERFLOW_TRUNCATE.
 
.androidx.wear.protolayout.proto.TextOverflowProp overflow = 5;

Returns:

The overflow.

public boolean hasMarqueeParameters()

 Parameters for Marquee animation. Only applies when overflow is
 TEXT_OVERFLOW_MARQUEE.
 
.androidx.wear.protolayout.proto.MarqueeParameters marquee_parameters = 8;

Returns:

Whether the marqueeParameters field is set.

public LayoutElementProto.MarqueeParameters getMarqueeParameters()

 Parameters for Marquee animation. Only applies when overflow is
 TEXT_OVERFLOW_MARQUEE.
 
.androidx.wear.protolayout.proto.MarqueeParameters marquee_parameters = 8;

Returns:

The marqueeParameters.

public boolean hasLineSpacing()

 Extra spacing to add between each line. This will apply to all
 spans regardless of their font size. This is in addition to original
 line heights. Note that this won't add any additional space before the
 first line or after the last line. The default value is zero and negative
 values will decrease the interline spacing.
 
.androidx.wear.protolayout.proto.SpProp line_spacing = 6;

Returns:

Whether the lineSpacing field is set.

public DimensionProto.SpProp getLineSpacing()

 Extra spacing to add between each line. This will apply to all
 spans regardless of their font size. This is in addition to original
 line heights. Note that this won't add any additional space before the
 first line or after the last line. The default value is zero and negative
 values will decrease the interline spacing.
 
.androidx.wear.protolayout.proto.SpProp line_spacing = 6;

Returns:

The lineSpacing.

public boolean hasLineHeight()

 The explicit height between lines of text. This is equivalent to the
 vertical distance between subsequent baselines. If not specified, defaults
 the font's recommended interline spacing.
 
.androidx.wear.protolayout.proto.SpProp line_height = 7;

Returns:

Whether the lineHeight field is set.

public DimensionProto.SpProp getLineHeight()

 The explicit height between lines of text. This is equivalent to the
 vertical distance between subsequent baselines. If not specified, defaults
 the font's recommended interline spacing.
 
.androidx.wear.protolayout.proto.SpProp line_height = 7;

Returns:

The lineHeight.