I am facing a problem.
I want to align the text of a button to the bottom with a padding of 20dp.
However, the text sticks at the bottom of my button.
<Button
android:id="@+id/CatButton"
android:layout_width="match_parent"
android:layout_height="150dp"
android:paddingBottom="20dp"
android:background="@drawable/rounded_1_selected"
android:gravity="bottom|center_horizontal"
android:text="test"/>
Can anyone please help me?
If you change layout_gravity = "bottom", your button align bottom; but if you change gravity = "bottom", your button's text align bottom. You should do that: