I am currently loading text into my app from an xml file from server.
However those text is assigned to TextView.
My Text are not align as per my need. i.e i want those text to be as microsoft word justification.
<TextView android:id="@+id/nvContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
android:layout_weight="1"
android:gravity="fill"
android:text="Inglot Cosmetics now in Kathmandu Inglot, which has been selling its products in over 240 stores all over the world is now here for you in Kathmandu. It has one of the most extensive colour ranges in cosmetics collections. Working with the best makeup artists, Inglot brings you the latest trends in colour, texture and form. Experiment with countless shades and combinations of face powder, blushers, eye shadows and lipsticks."
android:textColor="#ff000000"
android:textSize="14sp" />
The text is kind of long.
My app doesnt show text alignment as in the textview.
I want those text to be justified.
Is this possible? i read in stackoverflow.com that Android doesnt support text-aligment as justified.
Any alternatives. or should my xml file do something?
You can try:
instead of
And also give some padding by
android:padding.Final Solution:
Output:
I got the below output by using above XML layout: