setHyphenation 和 breakStrategy 在 TextView 中无法按预期工作

Jun*_*hao 6 android hyphenation

我试图在 TextView 中添加连字符来破坏长单词。例如,我有一个文本视图,其文本是“推荐”。因为该单词对于一行来说太长,所以我想在第一行中添加“Recommend-”,在第二行中添加“ation”,如下所示:

在此输入图像描述

但事实上,我得到了

在此输入图像描述

这是我对 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" />
Run Code Online (Sandbox Code Playgroud)

我尝试了breakStrategy值和hyphenationFrequency值的不同组合,但没有成功。知道为什么它会以这种方式或其他方式使连字起作用吗?提前致谢!