WannaBeGeek
WannaBeGeek

Reputation: 989

Justifying text in Android without using a WebView

Is it possible to justify the content in Android without using a WebView?

What I have come across after searching is that Android does not support full text-justification and it can be done only through WebView. Is there any other way of doing so?

Upvotes: 1

Views: 4482

Answers (3)

Darshak
Darshak

Reputation: 2326

You have to use WebView instead of TextView

textWebview.loadData("<p style=\"text-align: justify\">"+ "  [YOUR TEXT] " +"</p>", "text/html", "UTF-8");

It defiantly works.
Thank you.

Upvotes: 4

Ashish
Ashish

Reputation: 101

Fully justification is not supported You can either use multiple textview or use library

Upvotes: 0

Nezir
Nezir

Reputation: 6925

Check this :

<TextView>
   ...
   android:layout_gravity="center_vertical|right"
   ...
</TextView>

Android TextView Justify Text

Upvotes: 0

Related Questions