滚动三星银河列表视图的问题

时间:2011-08-19 06:11:36

标签: android

我开发了一个Android应用程序,它有ListView。它在模拟器和HTC设备中滚动得很好,但在三星Galaxy S和三星Vibrant手机中滚动不起作用,我得到了这个问题的原因,我的代码在下面..

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="@drawable/x01_background">
    <LinearLayout android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:orientation="vertical">
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:src="@drawable/topgroupwarmup"
               ></ImageView>
        <ListView android:padding="10dip" android:layout_width="fill_parent" 
            android:layout_height="fill_parent" android:id="@+id/list1" >
        </ListView>
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:src="@drawable/top_solowarmups"
         ></ImageView>
        <ListView android:padding="10dip" android:layout_width="fill_parent" 
            android:layout_height="fill_parent" android:id="@+id/list2">
        </ListView>
    </LinearLayout>
</ScrollView>

请帮助我,提前谢谢

2 个答案:

答案 0 :(得分:0)

在删除ScrollView标签后尝试.......你已经使用了2个listview,然后在android:layout_height =“fill_parent”中使用了wrap_content。

答案 1 :(得分:0)

两个ListView都应wrap_content。如果这不起作用,只需使用LinearLayout来保存列表项。