6

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

But In fact, I got

enter image description here

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!

Dan Bonachea
  • 2,408
  • 5
  • 16
  • 31
Junhao
  • 61
  • 2
  • Did you find a solution for this? I have the same problem. https://stackoverflow.com/questions/57479985/hyphenationfrequency-not-working-as-expected – Isak Aug 16 '19 at 08:31
  • Does this answer your question? [Hyphens are not added at line endings to join words in some languages](https://stackoverflow.com/questions/57479985/hyphens-are-not-added-at-line-endings-to-join-words-in-some-languages) – Dan Bonachea Jan 10 '23 at 07:00

0 Answers0