Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text justification library in Java [duplicate]

Possible Duplicate:
Can i set property of Textview like justify?

I'm writing an android app which needs text justification, which isn't supported natively, and I don't think using a WebView is going to work because of font and text sizes in relation to screen resolution and dimensions. With this in mind I'm going to write a custom view which extends the TextView which will do text justification and was wondering if anybody knows of any code I can look at which does this already to save me some time. Any other helpful advice would be greatly appreciated too.

like image 822
Martyn Avatar asked Nov 22 '11 10:11

Martyn


1 Answers

UPDATED

We have created a simple class for this. There are currently two methods to achieve what you are looking for. Both require NO WEBVIEW and SUPPORTS SPANNABLES.

LIBRARY: https://github.com/bluejamesbond/TextJustify-Android

SUPPORTS: Android 2.X to 5.X

SETUP

// Please visit Github for latest setup instructions.

SCREENSHOT

Comparison.png

like image 71
Mathew Kurian Avatar answered Oct 22 '22 00:10

Mathew Kurian