Why doesn't my relative layout take whole screen height

android, android-relativelayout, scrollview

Solution

Add `android:fillViewport="true"` to your ScrollView

Problem

So, i have simple layout with some text and a button. Text is positioned at start and takes, on some phones, more height then the height of screen so i have it positioned in scroll view. Next to that text i have one more textview and a button which should be positioned in the bottom right of the screen. The problem is that one large screens my button isn't at bottom but there where the text ends, and i can see that my relativelayout doesn't take whole height of the scrollView. My layout: ``` <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:text="Some dummy text" android:textColor="#969696" android:textSize="13dp" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="false" android:layout_below="@+id/text1" android:text="some dummy text2" android:textColor="#969696" android:textSize="13dp" /> <ImageButton android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:src="@drawable/btn49_2x" /> </RelativeLayout> </ScrollView> ``` My real layout is a bit more complex so i need to use relative layout. But how to make sure it takes whole screen height? I tried setting height to `wrap:content` but no effect.

Original source