Android:there Are A Listview In Scrollview So Listview Scrolling Not Happend.
Solution 1:
Never put a ListView
inside of a ScrollView
. Never. You have two options:
If you don't necessarily want the
ImageView
andButton
to scroll away, just remove theScrollView
:<LinearLayoutandroid:orientation="vertical"...><ImageView.../><Button.../><ListView.../></LinearLayout>
This one is slightly more complicated. Implement a custom list adapter (by extending BaseAdapter, for example, or one of its subclasses) and, in your
getView
method return theImageView
and theButton
for positions 0 and 1, respectively. This way, your layout will only contain aListView
, but its first two items will be theImageView
and theButton
.
P.S.: Never put a ScrollView
in a ListView
, either.
Solution 2:
I don't understand for what you try to use ScrollView with ListView too? If your layout is really big than screen, then will be good to use a ScrollView like described here:
<?xml version="1.0" encoding="utf-8"?><ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:scrollbars="vertical"android:visibility="visible"><LinearLayoutandroid:layout_width="fill_parent"android:layout_height="fill_parent">
..your any xml data
</LinearLayout></ScrollView>
ListView has internal scroll tool, so you just need to choose a correct way to use it.
Post a Comment for "Android:there Are A Listview In Scrollview So Listview Scrolling Not Happend."