I have a ListView inside a ScrollView, and I can scroll the contents of he list via my optical mouse button on my HTC Wildfire - it's like a physical cursor up/down thing. So far so good. The bad thing is that I cannot scroll the list by the normal touch/swipe that normally works on this kind of lists.
What could be wrong?
My layout is like this:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView android:id="@+id/MessageList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</ScrollView>
And some Java code to initialize the list:
public class MorseIt extends Activity {
private ListView lv1;
private String lv_arr[]={"Red","Green","Blue","Purple","White","Black","Pink","Cyan","Magenta"};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
lv1=(ListView)findViewById(R.id.MessageList);
lv1.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 , lv_arr));
}
}