2

I am looking for a simple implementation where I have multiple TextView(s) within an ExpandableListView (Each list item contains one TextView as a child and there can be 50-100 items in a list).

I want the text written within the TextView to be justified aligned. There are already few threads going on on SO where it is suggested to implement a WebView instead of TextView for this. But since WebView is a heavier widget as compared to TextView (I have multiple TextViews in the list and handling WebView within an ExpandableListView could be little problem as both are scrollable.) Furthermore, I have already finalized my code and this change will require major code change so I don't want to go for it.

It is suggested in Android TextView Justify Text to go for "android:gravity" and "android"layout_gravity". I have tried it but apparently its not working.

There is one third party library here: https://github.com/bluejamesbond/TextJustify-Android/tree/master/ but I was hoping to cope this problem within android configurations itself rather going out for TP library.

Can anyone please suggest how this can be implemented? If anyone has tweaked few configurations of the TextView to achieve it, please share. Thanks!

Community
  • 1
  • 1
Harry_S
  • 233
  • 4
  • 10

0 Answers0