title: How to Justify the text and align properly in textview in android
body: <p>I have one <code>TextView</code> in <code>xml</code>, but am giving the <code>TextView</code> values in java.while displaying its not proper alignment.Please can you give solution.</p>
  
  <p>In <code>Xml</code> i give the values means it's displaying properly,but in java i am giving values its not showing in proper way.I want to justify the text</p>
  
  <pre><code>    &lt;TextView 
      android:text="" android:id="@+id/result"
      android:layout_marginTop="13dp"
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_gravity="left|center|right" 
      android:gravity="left|center|right" 
      android:textStyle="bold" 
      android:textAlignment="center" 
      android:layout_marginRight="5dp" 
      android:layout_marginLeft="5dp"
      android:textSize="15dp" /&gt;
  </code></pre>