无法在android 4.1中平滑滚动图像列表视图
我正在使用图像列表视图来滚动图像,在2.3版上,列表视图可以平滑滚动,但在使用OS 4.0+的手机上则不能。所有的图片都是从R.drawable获取的,请找到我的代码附件 image\u list.xml无法在android 4.1中平滑滚动图像列表视图,android,android-listview,Android,Android Listview,我正在使用图像列表视图来滚动图像,在2.3版上,列表视图可以平滑滚动,但在使用OS 4.0+的手机上则不能。所有的图片都是从R.drawable获取的,请找到我的代码附件 image\u list.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_heig
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#A4A4A4"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:scaleType="fitXY" />
</LinearLayout>
尝试
SparseArray
以获得可绘制图像列表的更好性能。尝试将此添加到您的listview:
android:cacheColorHint="@android:color/transparent"
这将消除滚动列表时的闪烁…您使用的集合类型是什么。?list arrayList=new arrayList();