Tôi đã đặt công cụ chọn danh sách tùy chỉnh cho Đơn giản ListView
nhưng khi tôi chọn một mục, toàn bộ ListView
sẽ chuyển sang màu xanh lam. Tôi không hiểu vấn đề ở đâu.Làm nổi bật hành vi bí ẩn trong ListView
Đây là ListView của tôi:
<ListView android:id="@+id/TopListView" android:layout_width="fill_parent"
android:listSelector="@drawable/regular_selector"
android:layout_height="wrap_content">
</ListView>
và đó là regular_selector.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:state_focused="true"
android:drawable="@color/transparent" />
<item android:state_pressed="true"
android:drawable="@color/blue" />
<item android:state_focused="true"
android:drawable="@color/blue" />
</selector>
vì vậy bạn đã nhận được soln? nếu không bạn có thể cho biết kết quả mong đợi của bạn là gì? – havexz