setHyphenationFrequency doesn't work

Viewed 1033

I was trying to adding hyphenation on breaking long words in TextView. For example, I have a textView which text is "Recommendations". Because the word is too long for one line, I want to get "Recommend-" in the first line and "ation" in the second line like this : [enter image description here][1]

[1]: https://i.stack.imgur.com/pqSNh.png. But In fact, I got [enter image description here][1]

[1]: https://i.stack.imgur.com/WM3I4.png. Here's what I have for the TextView :

<TextView
   android:id="@+id/textViewid"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:text="@string/long_text"
   android:breakStrategy="high_quality"
   android:hyphenationFrequency="full" />

I have tried different combination of breakStrategy value and hyphenationFrequency value, but didn't make it work. Any idea of why it behaves this or other ways to make hyphenation working? Thanks in advance!

0 Answers
Related