I have a ListView and an ImageView contained in a LinearLayout. Unfortunately, ListView doesn't scroll the ImageView together with it.
I've tried to use ScrollView to wrap both components, but there is a problem with ListView if I did so.
Anyone know how to make all of the components inside LinearLayout scroll?
Here is my layout xml:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ImageView android:id="@+id/imgCanvas" android:layout_width="match_parent" android:layout_height="200dp" android:scaleType="centerCrop" /> <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@+id/imgCanvas" android:smoothScrollbar="true" /> </LinearLayout> Here is the screenshot of how it looks right now:
