I have a simple XML Layout, in which I would like to place a Button in the bottom right corner.
I first tried android:layout_gravity="bottom|right"
However, the result was the button gravitating toward the right side, but not the bottom.
I then tried “center” and that worked, but it remained unchanged in combination with “bottom”.
It appears that something is stopping the button from gravitating to the bottom.
Any help is appreciated.
The Layout in which the button is placed has a gravity attribute, which will give you this effect. Eg: