title: How to set three different textsize in single textview in android
body: <p>I want to set the three different text size in single textview as like the below image sample,<img src="https://i.stack.imgur.com/seadp.png" alt="enter image description here"></p>
  
  <p>I have tried with Html as like the below,</p>
  
  <pre><code> StringBuilder fontString = new StringBuilder();
  
      fontString.append("&lt;small&gt;");
      fontString.append("1.78");
      fontString.append("&lt;/small&gt;");      
      fontString.append("&lt;big&gt;&lt;b&gt;");
      fontString.append("33");
      fontString.append("&lt;/b&gt;&lt;/big&gt;");        
      fontString.append("&lt;sup&gt;");
      fontString.append("&lt;small&gt;");
      fontString .append("2");
      fontString.append("&lt;/small&gt;");
      fontString.append("&lt;/sup&gt;");
  </code></pre>
  
  <p>Also I tried SpannableString formatting,</p>
  
  <pre><code>SpannableString  spanString = new SpannableString("1.34456");
      spanString.setSpan(new RelativeSizeSpan(1.75f), 0,spanString.length()-2-1, 0);
      spanString.setSpan(new StyleSpan(Typeface.BOLD), spanString.length()-2-1, spanString.length()-1, 0);
      spanString.setSpan(new ForegroundColorSpan(Color.RED), spanString.length()-2-1,  spanString.length()-1, 0);     
      spanString.setSpan(new RelativeSizeSpan(3f), spanString.length()-2-1, spanString.length()-1, 0);        
      spanString.setSpan(new RelativeSizeSpan(1.25f), spanString.length()-1, spanString.length(), 0);
  </code></pre>
  
  <p>like the below mentioned image,
  <img src="https://i.stack.imgur.com/YfBcH.png" alt="enter image description here"></p>
  
  <p>Please suggest me if you know the solution,I have tried with superscript or subscript also but no luck.</p>