0

I have a textview to show a result from a process, but when the result too long (more than my textview width), it will automatically append a dash like in blue circle (in picture). How to remove it without make it scrollable, just remove the dash?

enter image description here

Ahmad Aghazadeh
  • 16,571
  • 12
  • 101
  • 98

4 Answers4

1

If you are using api 23 or above , you can use android:breakStrategy and as value BREAK_STRATEGY_SIMPLE.

Emin Ayar
  • 1,104
  • 9
  • 13
1

This might not be proper solution of your problem but it will help you to achieve this. Use EditTextView instead of TextView and set android:focusableInTouchMode="false",android:focusable="false" ,then EditTextView will work like TextView and it will not show dash(-) symble

Ajeet Choudhary
  • 1,969
  • 1
  • 17
  • 41
1

Add this on your TextView android:hyphenationFrequency="none", this will remove the hyphen

0

It is now possible with soft hyphen -> use \u00AD in strings, e.g.:

<string name="einzelfahrt_name">Einzelfahrrad\u00ADkarte</string>

Also, in your TextView, you have to add:

 android:hyphenationFrequency="full"
APTower
  • 343
  • 2
  • 8