Some day I will crack the code on these Android layouts. sigh
I need an activity with a TextView fixed to the top of the screen, a scrollable listview below that, and at the bottom, fixed to the screen, an editText and a button (the idea is for users to be able to add items to the list).
Working code below as question is now answered:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/tvAddQuizWordQuizName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="Quiz Name"
android:textSize="26dip"
/>
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/list"
android:layout_below="@+id/tvAddQuizWordQuizName"
android:layout_above="@+id/bottomArea"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/bottomArea"
>
<EditText
android:id="@+id/etAddQuizWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnAddQuizWord"
android:textColor="@android:color/black"
android:inputType="textNoSuggestions"
android:hint="Enter quiz word..."
android:textSize="32dip"
android:layout_alignParentLeft="true"
android:background="#0000ff"
>
</EditText>
<Button
android:text="Add"
android:id="@+id/btnAddQuizWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dip"
android:textStyle="bold"
android:gravity="center"
android:layout_alignParentRight="true"
android:onClick="AddButtonClicked"
/>
</RelativeLayout>
</RelativeLayout>
The problem is, the textview at the lop and the listView are not showing. I am sure it is something very simple, but I am just not getting it.
The layout below should position the element like you want.