title: Make a certain part of a android-textview align to the right
body: <p>I have this <code>TextView</code>. Some parts of it is supposed to be aligned to the left and some parts to the right. How would I do this in Java? </p>
  
  <p>Basicly I want the first line to align to the left, and the next line to the right and so on.</p>
  
  <p>Anyone got a clue?</p>
  
  <p>EDIT</p>
  
  <p>I have tried to use HTML and then when that did not work I tried spans.</p>
  
  <p>html attempt</p>
  
  <pre><code>textView.setText(Html.fromHtml("&lt;p align=\"right\"&gt;THIS IS TO THE RIGHT&lt;/p&gt;"));
  </code></pre>
  
  <p>And heres the span attempt</p>
  
  <pre><code>    String LeftText = "LEFT";
      String RightText = "RIGHT";
  
      final String resultText = LeftText + "  " + RightText;
      final SpannableString styledResultText = new SpannableString(resultText);
      styledResultText.setSpan(new AlignmentSpan.Standard(Alignment.ALIGN_OPPOSITE), LeftText.length() + 1, LeftText.length() + 2 +RightText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
      textView.setText(styledResultText);
  </code></pre>
  
  <p>But none of them seems to work.</p>