我添加了一个简单ListSelector
的ListView
. 问题是,ListSelector
仅在 ListView 滚动一点后才显示。
如何使ListSelector
选择时立即出现?
列表显示
<ListView
android:id="@+id/contentListView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_above="@id/buttonEntwerten"
android:scrollingCache="false"
android:cacheColorHint="#00000000"
android:listSelector="@drawable/list_selector"
/>
@drawable/list_selector
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_selector__gradient_bg_hover" />
</selector>