Prevent word-break in a TextView

Solution 1:

From api 23 you can choose the break strategy and that should fix your issue.

By default android for TextView use BREAK_STRATEGY_HIGH_QUALITY and that is causing the words breaking using hyphens.

If you want to avoid that, you can set the break strategy to BREAK_STRATEGY_SIMPLE.

You can find more information in the api doc.

I hope that helps you.

Solution 2:

Try using this in TextView, this works for me

android:breakStrategy="simple"

Solution 3:

This is a new thing in android 6 version(Marshmallow).

Try adding the code below to your TextView in xml layout

android:hyphenationFrequency="none"