1

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?

blahdiblah
  • 32,000
  • 21
  • 97
  • 150
WannaBeGeek
  • 981
  • 13
  • 31

3 Answers3

4

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.

Darshak
  • 2,258
  • 4
  • 20
  • 45
0

Check this :

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

Android TextView Justify Text

Community
  • 1
  • 1
Nezir
  • 6,389
  • 12
  • 52
  • 74
0

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

Ashish
  • 103
  • 9