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
  • 33,069
  • 21
  • 98
  • 152
WannaBeGeek
  • 979
  • 14
  • 32

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,298
  • 4
  • 23
  • 45
0

Check this :

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

Android TextView Justify Text

Community
  • 1
  • 1
Nezir
  • 6,727
  • 12
  • 54
  • 78
0

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

Ashish
  • 101
  • 9