TextView with too long Strings

Because android:singleLine="true" attribute has been deprecated, set the following attributes to your TextView:

android:ellipsize="end"
android:maxLines="1"

The TextView will then show only the text that can fit to your TextView, followed by an ellipsis ...


you can set

android:maxLines="1"
android:ellipsize="end"

to your textview, so the text which long than your textview will be hide.


i dont know if this will help you but saw this on developer.android...

With Android 8.0 (API level 26) and higher, you can instruct a TextView to let the text size expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. This setting makes it easier to optimize the text size on different screens with dynamic content.

android:autoSizeTextType="uniform"

There are three ways you can set up the autosizing of TextView:

Default

Granularity

Preset Sizes

=================================================

readMore