Has anyone come across this? There is such a markup
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root_view" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" > <!-- top bar --> <RelativeLayout android:id="@+id/top_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:background="@drawable/topbar_bg" > <TextView android:id="@+id/diafilm_title" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:text="Test Test" android:textColor="#ffffff" android:textSize="17sp" /> <Button android:id="@+id/share_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/share_selector" /> <Button android:id="@+id/bookmarks_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/bookmark_selector" /> <Button android:id="@+id/sett_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/settings_selector" /> <ImageView android:layout_width="wrap_content" android:layout_height="match_parent" android:src="@drawable/divider" /> <Button android:id="@+id/prev_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:background="@drawable/prev_selector" /> <Button android:id="@+id/play_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:background="@drawable/play_selector" /> <Button android:id="@+id/next_butt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:background="@drawable/next_selector" /> </RelativeLayout> <!-- content --> <RelativeLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below=" @id /top_bar" android:layout_margin="2dp" > <FrameLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" > <ru.diafilm.CustomGallery android:id="@+id/screen_img" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#060405" android:spacing="80dp" android:src="@drawable/background" /> <View android:id="@+id/invisible_view" android:layout_width="75dp" android:layout_height="75dp" android:layout_gravity="center" /> </FrameLayout> <LinearLayout android:id="@+id/slides_bar" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <TextView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:text="@string/slides_text" android:textColor="#000000" /> <GridView android:id="@+id/slides_grid" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="6" android:columnWidth="90dp" android:gravity="center" android:horizontalSpacing="10dp" android:numColumns="1" android:stretchMode="columnWidth" android:verticalSpacing="10dp" /> </LinearLayout> </RelativeLayout> </RelativeLayout>
The problem is that in spite of the specified attribute in the bottom android: layout_below = " @id / top_bar", the top layout occupies the entire screen.