Alex Rivera | Logout

RelativeLayout's layout_above gives "No resource found" error

Asked 2011-08-15T14:30:09.350
11
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
  <ListView
      android:layout_above="@id/btn_4"    <-- this line error: No resource found
      android:layout_width="match_parent"
      android:layout_height="200dp" />
  <Button android:id="@+id/btn_4"         <-- I declare the id here
      android:layout_alignParentBottom="true"
      android:layout_height="wrap_content"
      android:layout_width="match_parent" />
</RelativeLayout>

Any suggestions?

Edit
Report

1 Answer

2

Declare the ListView list_1 after declaring the Button btn_4 as it tries to reference it in android:layout_above="@id/btn_4".

answered 2011-08-15T14:39:10.307

Your Answer