次の問題があります: テーマ付きの背景画像を持つ通常の ListView を使用しているため、パフォーマンスが大幅に低下します。ウィンドウ (themes.xml を参照) の背景画像を削除すると、すべてが滑らかになります。背景画像を使用すると、速度が著しく低下します。
私はすでに試しました:
- android:cacheColorHint="#00000000"
- listview.setScrollingCacheEnabled(false);
しかし、何も機能しませんでした。ListView はただの白なので、なぜこれが遅いのかわかりません - 問題はないはずです...
テーマ.xml:
<item name="android:windowBackground">@drawable/window_bg</item>
list.xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="10dp">
<ListView
android:id="@+id/my_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"/>
</RelativeLayout>