title: How to Align a trailing string to the bottom right corner of a TextView
body: <p>In the picture bellow i want the <code>Footnote</code> string to always appear floating to the right edge of the Textview:</p>
  
  <p><a href="https://i.stack.imgur.com/rMrPf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rMrPf.jpg" alt="enter image description here"></a></p>
  
  <p>I tried the following but it doesn't work:</p>
  
  <pre><code>SpannableStringBuilder builder = new SpannableStringBuilder();
  SpannableString item = new SpannableString ("Main text");
  builder.append (item);
  builder.append ("  ");
  String footnote = "Footnote";
  int len = footnote.length();
  SpannableString subitem = new SpannableString (footnote);
  subitem.setSpan (new ForegroundColorSpan (color), 0, len, 0);
  subitem.setSpan (new AbsoluteSizeSpan (12, true), 0, len, 0);
  subitem.setSpan (new AlignmentSpan.Standard (Layout.Alignment.ALIGN_OPPOSITE), 0, len, 0);
  builder.append (subitem);
  
  myTextView.setText (builder, TextView.BufferType.SPANNABLE);
  </code></pre>