I have 2 LinearLayouts and a button within a relative layout.
They should look like this:
A LinearLayout with a top bar (Approx. 20% of the screen)
Lots of elements in a scrollview which takes up most of the screen (Approx. 60% of the screen)
A Button at the bottom (Approx. 20% of the screen)
I have tried this:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/layoutTopBlack"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<include layout="@layout/top_black_bar_cancel_register_button"/>
</LinearLayout>
<LinearLayout
android:id="@+id/layoutCenter"
android:layout_below="@id/layoutTopBlack"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include layout="@layout/top_black_bar_cancel_register_button"/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/buttonNextStep"
android:text="@string/next_step"
style="@style/mainButtonStyle"/>
</RelativeLayout>
This does not work. The layoutCenter lays itself over the button, so i never see the button.
Any suggestions?
Thanks in advance.
Edit:
I found this from the editor:
Couldn’t resolve resource @id/layoutTopBlack
Just tell your layoutCenter to layout itself above the button, something like this: