I am tackling relativeLayout problem in my application.
I take one image and button. I want to make button is bottom of the image but is not set.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageButton android:src="@drawable/layout_logo"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/image" />
<Button android:id="@+id/button3"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:drawableBottom="@id/image"
android:gravity="bottom" />
</RelativeLayout>
RelativeLayoutusesandroid:layout_aboveandandroid:layout_belowto position elements with regard to others. Changing yourandroid:gravity="bottom"toandroid:layout_below="@id/image"should fix this.