如何更改 Textview 中的字母间距? [英] How to change letter spacing in a Textview?
本文介绍了如何更改 Textview 中的字母间距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改文本视图中的字母间距?如果我在其中包含 HTML 文本会有帮助吗(我不能在我的代码中使用 webview).
How can i change letter spacing in a textview? Will it help if I have HTML text in it (I cannot use webview in my code).
附:我在带有 HTML 文本的 textview 中使用我自己的字体.
P.S. I'm using my own typeface in the textview with HTML text.
推荐答案
根据您需要多少间距,这可能会有所帮助.这是唯一与 TextView 中的字母间距相关的东西.
Depending on how much spacing you need, this might help. That's the only thing remotely related to letter-spacing in the TextView.
请参阅下面的 @JerabekJakub 的回复,以获得更新的、更好的从 api 21 (Lollipop) 开始的方法
please see @JerabekJakub's response below for an updated, better method to do this starting with api 21 (Lollipop)
这篇关于如何更改 Textview 中的字母间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文