I have two buttons. I want one to be aligned at the top center of the application. I want to get the other button to ignore the gravity settings and go where I tell it. How do I do this?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relative_layout"
android:layout_width="fill_parent"
android:gravity="center_horizontal"
android:layout_height="fill_parent" >
<Button
android:id="@+id/the_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Centered Button"
android:layout_alignTop="@id/relative_layout" />
<Button
android:id="@+id/the_button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Random Button"
android:ignoreGravity="@id/relative_layout" />
</RelativeLayout>