Reputation: 121
I have an expandablelistview and above that there is a relative layout which contains an image .I want to scroll listview and the above layout at same time ? is it possible ?
<RelativeLayout
android:id="@+id/thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dip"
android:layout_marginTop="38dip"
android:padding="3dip" >
<ImageView
android:id="@+id/list_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sss" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/topbarsecond"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ExpandableListView
android:id="@+id/expandableListView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginBottom="25dip"
android:layout_marginTop="5dip"
android:layout_alignParentLeft="true"
android:cacheColorHint="#00000000"
android:divider="#d6d7da"
android:dividerHeight="5dp"
android:groupIndicator="@null"
android:layout_alignParentTop="true" >
</ExpandableListView>
Upvotes: 0
Views: 1199
Reputation: 2828
You can add the RelativeLayout as HeaderView of ExpandableListView.
ListView#addHeaderView(View v)
Please refer to this.
Upvotes: 0
Reputation: 1317
Since a list already has a scrollview by default adding another scrollview may not work properly,hence try to put a separate scrollview in the enclosing layout without a listview,which may solve your purpose.
Upvotes: 0
Reputation: 1046
Just put all your views (including ListView) into a layout and then put it to a ScrollView
Upvotes: 2