1

I'm using TextViews in my app. I set the hyphenation and wordbreak attributes as shown in the code.

I've searched up & down, but cannot get an answer. Any hints welcome!

<TextView
    android:id="@+id/theText1"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:background="@android:color/white"

    android:breakStrategy="high_quality"
    android:hyphenationFrequency="full"

    android:paddingHorizontal="2dp"
    android:paddingVertical="2dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_bias="0.060000002" />

TextView theTextView1 = findViewById(R.id.theText1);
//inputText is a very long line that I won't post here
theTextView1 .setText(inputText);

it shows up like:

https://www.examenvragen.nl/img/hyphen.png

mvdn
  • 21
  • 1
  • 9

0 Answers0