title: Dynamically Displaying Text with TextView (Android)
body: <p>Basically what I want to do in my Android app is use TextView to display two different pieces of text at once. So in code, I want to be able to do something like this:</p>
  
  <pre><code>    LinearLayout ll = new LinearLayout(this);
      TextView text = new TextView(this);
      text.setTextColor(0xFF000000);
      text.setGravity(Gravity.CENTER_HORIZONTAL);
      text.setTextSize(20f);
      text.setText("Text1");
      text.setTextSize(14f);
      text.setColor(0xFF0000FF);
      text.setText("\nText2");
      ll.addView(text);
  </code></pre>
  
  <p>To clarify, I am trying to display a black "Text1" and a blue "Text2" at once using only a single TextView. Obviously this doesn't work out using the code above. I've considered using a second TextView but that seems like a waste of effort and memory to me. I'm sure the brilliant minds here can come up with the best solution to this.</p>
  
  <p>Thank you very much in advance for your time and your assistance.</p>