<Text>
Aufmerksamkeits{'\u00AD'}defizit
</Text>
This leads on iOS to
Aufmerksamkeits-
defizit
But on Android to
Aufmerksamkeitsd
efizit
So it seems that Android ignores the given soft hyphen. How can I make this work on Android as well?
Thanks!
I now it is a bit late, but I spent more time on this than I am proud of. If you want to use soft hyphen use \u00AD in strings, e.g.:
<string name="einzelfahrt_name">Einzelfahrrad\u00ADkarte</string>
In order to make this working though, in your TextView, you have to add:
android:hyphenationFrequency="full"
I have the same problem and it seems that Android ignores soft hyphens.
The only workaround I could think of is, only on Android, to replace the \u00AD
with \u200B
. It's known as zero-width-space, and it would properly break the words where expected, although it would not show any hyphenation character. You would end up with:
Aufmerksamkeits
defizit
Not the perfect solution, but at least it will not break words at random positions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With