public final class

LayoutElementProto.Spannable

extends <any>

implements LayoutElementProto.SpannableOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.LayoutElementProto.Spannable

Overview

 A container of Span elements. Currently, this supports SpanImage and SpanText
 elements, where each individual Span can have different styling applied to it
 but the resulting text will flow naturally. This allows sections of a
 paragraph of text to have different styling applied to it, for example,
 making one or two words bold or italic.
 
Protobuf type androidx.wear.protolayout.proto.Spannable

Summary

Fields
public static final intLINE_HEIGHT_FIELD_NUMBER

public static final intLINE_SPACING_FIELD_NUMBER

public static final intMARQUEE_PARAMETERS_FIELD_NUMBER

public static final intMAX_LINES_FIELD_NUMBER

public static final intMODIFIERS_FIELD_NUMBER

public static final intMULTILINE_ALIGNMENT_FIELD_NUMBER

public static final intOVERFLOW_FIELD_NUMBER

public static final intSPANS_FIELD_NUMBER

Methods
protected final java.lang.ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public static LayoutElementProto.SpannablegetDefaultInstance()

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 LayoutElementProto.SpanOrBuildergetSpansOrBuilder(int index)

 The Span elements that form this Spannable.

public java.util.List<LayoutElementProto.SpanOrBuilder>getSpansOrBuilderList()

 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.

public static LayoutElementProto.Spannable.BuildernewBuilder()

public static LayoutElementProto.Spannable.BuildernewBuilder(LayoutElementProto.Spannable prototype)

public static LayoutElementProto.SpannableparseDelimitedFrom(java.io.InputStream input)

public static LayoutElementProto.SpannableparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.SpannableparseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.SpannableparseFrom(java.nio.ByteBuffer data)

public static LayoutElementProto.SpannableparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.SpannableparseFrom(com.google.protobuf.ByteString data)

public static LayoutElementProto.SpannableparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.SpannableparseFrom(com.google.protobuf.CodedInputStream input)

public static LayoutElementProto.SpannableparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.SpannableparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static <any>parser()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int SPANS_FIELD_NUMBER

public static final int MODIFIERS_FIELD_NUMBER

public static final int MAX_LINES_FIELD_NUMBER

public static final int MULTILINE_ALIGNMENT_FIELD_NUMBER

public static final int OVERFLOW_FIELD_NUMBER

public static final int MARQUEE_PARAMETERS_FIELD_NUMBER

public static final int LINE_SPACING_FIELD_NUMBER

public static final int LINE_HEIGHT_FIELD_NUMBER

Methods

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

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

public java.util.List<LayoutElementProto.SpanOrBuilder> getSpansOrBuilderList()

 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 LayoutElementProto.Span getSpans(int index)

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

public LayoutElementProto.SpanOrBuilder getSpansOrBuilder(int index)

 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;

public ModifiersProto.Modifiers getModifiers()

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

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;

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;

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;

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;

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;

 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;

public boolean hasMarqueeParameters()

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

public LayoutElementProto.MarqueeParameters getMarqueeParameters()

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

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;

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;

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;

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;

public static LayoutElementProto.Spannable parseFrom(java.nio.ByteBuffer data)

public static LayoutElementProto.Spannable parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable parseFrom(com.google.protobuf.ByteString data)

public static LayoutElementProto.Spannable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable parseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable parseDelimitedFrom(java.io.InputStream input)

public static LayoutElementProto.Spannable parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable parseFrom(com.google.protobuf.CodedInputStream input)

public static LayoutElementProto.Spannable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.Spannable.Builder newBuilder()

protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public static LayoutElementProto.Spannable getDefaultInstance()

public static <any> parser()