How to make TextView the same size regardless of the texts inside How to make TextView the same size regardless of the texts inside android android

How to make TextView the same size regardless of the texts inside


All you need to do is change the Layout_height and Layout_width like this:

                   <TextView android:layout_width="149dp"                              android:layout_height="50dp"                              android:background="@drawable/answer_small_off"                              android:layout_weight="1"                              android:text="@string/hello"                               android:gravity="center"                               android:id="@+id/main_text_answer1"                               android:lines="3"                               android:maxLines="3"                              android:textSize="10dp" android:minLines="3" android:minEms="20" android:maxEms="20" android:ems="20">                   </TextView>