Text justification library in Java [duplicate]

我们两清 提交于 2019-11-27 00:32:32

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/8225353/text-justification-library-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!