How to change letter spacing in a Textview?

OkyDokyman picture OkyDokyman · Feb 27, 2011 · Viewed 152.9k times · Source

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).

P.S. I'm using my own typeface in the textview with HTML text.

Answer

JerabekJakub picture JerabekJakub · Jan 26, 2015

Since API 21 there is an option set letter spacing. You can call method setLetterSpacing or set it in XML with attribute letterSpacing.