Are there alternatives to the letterSpacing attribute for EditText in API level 20 or lower

I added that the question does not duplicate this question in the "Editing" section, please view ..


We use the letterSpacing attribute in EditText to determine the spacing between letters, for example here in the picture .

But according to the documentation , it was only introduced at API level 21 or higher, if we try to use it in a lower version of the API level, It shows the rendering problem directly, as in this figure in this picture .

Are there alternatives to letterSpacing for use in EditText up to API level 20?



Edit

It was marked as duplicated, but I want to prove that the android:textScaleX and android:letterSpacing really different.

Take an example of adding these two attributes to an EditText

The result of adding android:letterSpacing is

result letterSpacing

And the result of adding android:textScaleX is result2

+5
source share
1 answer

Sorry, you were not able to configure letterSpacing in Api before 21, but you can configure it if you draw text on Canvas using the 2D graphics API.

+1
source

Source: https://habr.com/ru/post/1243112/


All Articles