At the top are two pictures, in one of them a Button (QWERTY2) loses its true form when it contains the number of lines unequal to the number its neighbor has on the left (QWERTY1) (the neighbor has 1 line, and that 2). The same situation can occur with Button QWERTY1, relative to QWERTY2. Naturally, when they have an equal number of lines, the buttons do not lose their shape, as you noticed from the first picture. In contrast, with the QWERTY3, QWERTY4 buttons, this does not happen. How to fix this problem so that the buttons retain their normal form, regardless of the number of words or lines in them? Below is my XML code:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="count" android:layout_toLeftOf="@+id/amount_of_true_answers" android:layout_toRightOf="@+id/amount_of_false_answers" android:textSize="22dp" android:gravity="center" android:id="@+id/questCounterId" android:textColor="#FFFFFF" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="true" android:layout_marginRight="7dp" android:id="@+id/amount_of_true_answers" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:textSize="22dp" android:textColor="#007E41" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Question" android:textSize="24dp" android:id="@+id/QuestionText" android:layout_above="@+id/nextButton" android:layout_below="@+id/questCounterId" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="false" android:id="@+id/amount_of_false_answers" android:textSize="22dp" android:layout_marginLeft="7dp" android:layout_alignParentTop="true" android:textColor="#861F23" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/a_and_b" android:id="@+id/nextButton" android:onClick="ShowNextQuestion" android:layout_marginBottom="10dp" android:text=">" android:layout_centerHorizontal="true" android:background="@drawable/using_nextprevbuttons" android:shadowColor="#FFFFFF" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="4" android:textSize="32dp" /> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/c_and_d" android:id="@+id/a_and_b" android:layout_marginBottom="10dp" > <Button android:onClick="OptionButtonPressed" android:id="@+id/opta" android:text="qwerty1" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:background="@drawable/using_optionshape" android:textColor="#000000" android:shadowColor="#FFFFFF" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="5" android:layout_marginRight="10dp" android:layout_marginLeft="5dp" /> <Button android:id="@+id/optb" android:onClick="OptionButtonPressed" android:text="qwerty2 qwerty2 qwerty2 " android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:background="@drawable/using_optionshape" android:textColor="#000000" android:shadowColor="#FFFFFF" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="5" android:layout_marginRight="5dp" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/c_and_d" android:layout_alignParentBottom="true" android:layout_marginBottom="10dp" > <Button android:text="qwerty3" android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:background="@drawable/using_optionshape" android:textColor="#000000" android:shadowColor="#FFFFFF" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="5" android:layout_marginRight="10dp" android:layout_marginLeft="5dp" android:onClick="OptionButtonPressed" android:id="@+id/optc" /> <Button android:text="qwerty4" android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:background="@drawable/using_optionshape" android:textColor="#000000" android:shadowColor="#FFFFFF" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="5" android:layout_marginRight="5dp" android:id="@+id/optd" android:onClick="OptionButtonPressed" /> </LinearLayout> </RelativeLayout> 

