Anyone have a autosizeText impl they like? I copie...
# compose
c
Anyone have a autosizeText impl they like? I copied a few from SO, but using them in an AnimatedVisibility block causes weirdness (text grows every frame lol). Anyone have some impl they could share?
f
I don't, but depending on your layout, maybe you can try to replace the default animation (fade + expand) to simply fade so that the size does not change
v
Did you try wrapping
AppCompatTextView
with
AndroidView
and manually enabling autosize for it with
TextViewCompat.setAutoSizeText...
?
a
My implementation (auto shrink only though) However text resizing during expand/shrink animation seems expected, as its layout size will be changing.
c
Good points about fade + expand vs animatedVisibility. I'll try that with alberts impl.