title: Why my AlignmentSpan doesn't work (line)?
body: <p>From my TextView, I want to set a part of text at left and another part at right (on the same line!), but it doesn't work. The text is always at left.</p>
  <pre><code>public class SliceNutrientsSection extends AppCompatTextView {
  ...
  
  private void setText(String text, int nameLength, int appearance) {
          SpannableString spannableString = new SpannableString(text);
          spannableString.setSpan(new AlignmentSpan.Standard(Layout.Alignment.ALIGN_OPPOSITE),
                  nameLength, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
          append(spannableString);
      }
  </code></pre>
  <p>This component is used like:</p>
  <pre><code>&lt;com.xxx.ui.widget.slice.SliceNutrientsSection
         android:id=&quot;@+id/nutrients&quot;
         android:layout_width=&quot;match_parent&quot;
         android:layout_height=&quot;wrap_content&quot;/&gt;
  </code></pre>
  <p>Ps: if I take all the text to align it at right, it works, but with a part of text it doesn't work...</p>
  <p>Thank you by advance guys!</p>