Q:

How to don't change a size of the button when adding a new line to the button text and increasing the button size?

For example, I have a vertical linear layout with 2 buttons which have android:layout_weight="1"inside. The problem is that if I add a new line to the button text using &#10;and increase its size, that button becomes bigger than another one. How to make a button to not change its size if the text size was changed?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#00ACC1"
    tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">

        <Button
            android:id="@+id/button18"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_weight="1"
            android:background="@drawable/colorofbuttons"
            android:fontFamily="@font/architects_daughter"
            android:text="Mom"
            android:textAllCaps="false"
            android:textColor="#ffffff"
            android:textSize="18sp"></Button>

        <Button
            android:id="@+id/button19"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_weight="1"
            android:background="@drawable/colorofbuttons"
            android:ellipsize="end"
            android:fontFamily="@font/architects_daughter"
            android:maxLines="1"
            android:text="My&#10;Name"
            android:textAllCaps="false"
            android:textColor="#ffffff"
            android:textSize="18sp" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">

        <Button
            android:id="@+id/button20"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_weight="1"
            android:background="@drawable/colorofbuttons"
            android:fontFamily="@font/architects_daughter"
            android:text="Dad"
            android:textAllCaps="false"
            android:textColor="#ffffff"
            android:textSize="18sp" />

        <Button
            android:id="@+id/button21"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_weight="1"
            android:background="@drawable/colorofbuttons"
            android:fontFamily="@font/architects_daughter"
            android:text="Girl"
            android:textAllCaps="false"
            android:textColor="#ffffff"
            android:textSize="18sp" />
    </LinearLayout>
</LinearLayout>

A:

In your button code REPLACE
        android:layout_height="wrap_content"

With
        android:layout_height="0dp"

it will work :)

