Reputation: 255
https://i.sstatic.net/Utrxn.png
I made a picture showing what I want my layout to look like. Basically it's a RelativeLayout on top of a LinearLayout. I set the layout_weight=3 for relative, and layout_weight=1 for linear. This is not working so far. Can anyone tell me whats wrong with my XML?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="kim.albert.marveleventtracker.EventDescriptionActivity">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="3"></RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="horizontal">
</RelativeLayout>
Upvotes: 0
Views: 91
Reputation: 133
You should change top layout is LinearLayout, set orientation is vertical
Upvotes: 2