I have a RelativeLayout in a ScrollView on which I set fill_parent. However, it is filled only horizontally, not vertically. I want to add more content to the RelativeLayout, but first I need to find out why the RelativeLayout will not fill the height of the ScrollView.
Thanks for any help.
<ScrollView
android:id="@+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/gray"
android:layout_below="@+id/previewButton"
android:layout_marginTop="10dp" >
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_below="@+id/matchingWordsLabel"
android:background="@color/white"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
>
<TextView
android:id="@+id/titleLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="Title:"
/>
<EditText
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/titleLabel"
android:layout_alignBaseline="@+id/titleLabel"
android:ems="10" />
</RelativeLayout>
</ScrollView>
source
share