I have one TextView
in xml
, but am giving the TextView
values in java.while displaying its not proper alignment.Please can you give solution.
In Xml
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
<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" />