material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

Material Button adding spaces between letters on Lollipop

Open ahmaducg opened this issue 7 years ago • 3 comments

In API 21, when using a custom font, the MaterialButton seems to be placing spacing between each letter.

The font is not the problem, as in other Views such as the TextView, the letters are intact.

image

ahmaducg avatar Jul 23 '19 11:07 ahmaducg

Hi, You can override the MaterialButton letter spacing to achieve the desired result with this font. You should set textAppearanceButton in your theme to be a TextAppearance which sets android:letterSpacing to 0.

Let us know if this doesn't solve your problem or if you have any other questions.

andrelabonte avatar Jul 24 '19 20:07 andrelabonte

android:textAppearance=”?attr/textAppearanceBody1”

PawankumarPK avatar Nov 04 '20 05:11 PawankumarPK

Thanks @PawankumarPK, this solution is easier

aminekarimii avatar Nov 07 '20 18:11 aminekarimii