当文字很小时,我得到这个:
但是当文字很大时,我得到了这个:
是否可能通过更好地使用空格或自动减小尺寸来调整文本?
这是我的TextVIEw xml:
<TextVIEw androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:background="@color/seaGreen" androID:gravity="center_vertical" androID:padding="10dp" androID:textcolor="@color/white" androID:textSize="35sp" />
解决方法:
为此,您需要使用外部库,否则您可以将重力设置为中心
图书馆 :
https://github.com/grantland/android-autofittextview
对于文本对齐
https://github.com/bluejamesbond/TextJustify-Android
https://github.com/programingjd/justified
要么
你可以查看answer
总结以上是内存溢出为你收集整理的如何在Android环绕下制作TextView并精美调整文本?全部内容,希望文章能够帮你解决如何在Android环绕下制作TextView并精美调整文本?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)