I have 2 textviews and 1 expandable list view wrapped inside a relative layout and this layout is inside the scrollview. The expandable list view is at the bottom of the activity. I can get the activity to scroll when I have a long text for the textview but when I expand the list, it doesn't scroll down to the expanded content. Here is my XML layout and the screen shot of the activity:
<Scrollview 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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".AboutActivity$PlaceholderFragment"
android:id="@id/scrollview"
android:background="#2d89ef"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@id/relativelayout"
android:weightSum="3">
<TextView
android:text="ABOUT PAGE"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:textColor="#FFFFFF"
android:id="@id/about_text"
android:autoText="false"
android:textStyle="normal"
android:typeface="normal"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/faq"
android:id="@+id/textView"
android:layout_below="@id/about_text"
android:layout_alignParentLeft="true"
android:layout_weight="1"/>
<ExpandableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/expandableListView"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_weight="1"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</Scrollview>
When I expand the list, I cannot scroll to the end of the expandlistview. I want the expandlistview's height to update to wrap to its expanded content.