-1

As you can see in attached images, line 1 has two words, line 2 has 4 words and last line has one word. But they all have equal width irrespective of different text size and word count.Can anyone help me to achieve this? enter image description here

1 Answers1

0

use AppCompatTextViewand set android:autoSizeTextType="uniform" , android:maxLines="1"

 <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/textView"
        android:layout_width="400dp" <!--fixed size-->
        android:layout_height="200dp" <!--fixed size-->
        android:autoSizeTextType="uniform"
        android:maxLines="1"/>
Ehsan msz
  • 1,774
  • 2
  • 13
  • 26