is onTextLayout for BTF2 operational? not getting ...
# compose-android
b
is onTextLayout for BTF2 operational? not getting overflow reporting correctly
a
Text in a text field is scrollable so I think basically it never overflows. What are you expecting?
b
maxLines = 1 would in theory overflow
a
Not actually because the text will be horizontally scrollable.
b
Hm true
Trying to auto size text down to fit when it would in theory overflow
h
You can use scrollState.maxValue to check whether TextField became scrollable, which indicates overflow. Another approach https://gist.github.com/halilozercan/40ec1cc005e0b41e836a7ad21c127dcd https://gist.github.com/halilozercan/d1468efa45c4e9a71907623e41c2ccb7 This is for BTF1 but should work with the new onTextLayout too
b
Oh dope. Thank you!