在 TextView Android 中对齐文本 [英] Justify Text in TextView Android

查看:21
本文介绍了在 TextView Android 中对齐文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让 textview 合理化?有可能得到解决方案吗?我搜索了大多数论坛,但我没有弥补.请帮帮我.

How do you get textview to be justified ? is it possible to get the solution? I have searched most of the forums but i didn't make it up. please help me out.

推荐答案

Android 不支持文本对齐,抱歉.您可以使用 android:gravity 属性将文本左对齐或右对齐或居中等,但您不能真正证明它的合理性.我猜唯一的选择是使用 WebView 显示文本,然后使用 CSS 使文本对齐.

Android doesn't support text justification, sorry. You can use android:gravity attribute to align text to left or right or center etc, but you can't really justify it. The only option I guess is to use a WebView to show text and then use CSS to get the text justified.

这篇关于在 TextView Android 中对齐文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆