I am trying to auto-size my TextView to fit in a specific width on one line, it was quite easy for API 26 and above, however, I want to support my app for use with APIs back to Lolipop. I am having a hard time trying to do this with java code. Can anyone help me? Thank you.
Yes you can !
replace
android:autoSizeTextTyp="uniform"
with :
app:autoSizeTextType="uniform"
(At least working on sdk 23, with a simple TextView)
You can use the support library for older APIs https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With