You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All I wanted is that it would fit into it boundaries.
Using the next XML will make it very slow and also truncate the text:
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
android:layout_width="180dp"
android:layout_height="203dp"
android:layout_below="@+id/text_input"
android:maxLines="2"
android:text="content text sample"
android:textSize="1000dp"/>
And this is what I got :
plus it was very slow.
note that I've set 1000dp so that it will resize to the max that it can. a better way is to do it in code.
I think it should work this way:
using the current configurations of the TextView, if it failed to fit, try to find a font that will make it fit.
if failed with this, try to add a line (till reaching max lines that were set), and for each iteration there try to fit the font.
For the font checking, I think it should use binary search, instead of decreasing by 1 .
The text was updated successfully, but these errors were encountered:
All I wanted is that it would fit into it boundaries.
Using the next XML will make it very slow and also truncate the text:
And this is what I got :
plus it was very slow.
note that I've set 1000dp so that it will resize to the max that it can. a better way is to do it in code.
I think it should work this way:
using the current configurations of the TextView, if it failed to fit, try to find a font that will make it fit.
if failed with this, try to add a line (till reaching max lines that were set), and for each iteration there try to fit the font.
For the font checking, I think it should use binary search, instead of decreasing by 1 .
The text was updated successfully, but these errors were encountered: