Question

I wanted to know if there is a way to place a button on the bottom of the screen, no matter what size screen the device has. I basically want the button to have a gravity="bottom", not just its text. I have been trying to do this, and I cannot find a way to do it. any suggestions?

Was it helpful?

Solution 3

Never mind, I created a child LinearLayout only for and I put

android:gravity="bottom"

in the child and it worked :-)

OTHER TIPS

What layout is the button in? Using a relative layout, you can set the button to align_parent_bottom.

use a RelativeLayout with layout_height="fill_parent" then set the button's layout_alignParentBottom value to true in the XML file

Try using android:layout_gravity="bottom" on the Button :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top