Tôi muốn thả bóng ở mục ListView và cũng áp dụng công cụ chọn tùy chỉnh. Nhưng tôi không biết làm thế nào để áp dụng chúng cùng một lúc ..ListView Mục bóng + bộ chọn tùy chỉnh
Đây là shadow.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape android:shape="rectangle">
<solid android:color="@android:color/darker_gray" />
</shape>
</item>
<item
android:right="1dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
</shape>
</item>
</layer-list>
Và chọn tùy chỉnh:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false"
android:drawable="@android:drawable/color/white" />
<item
android:state_pressed="true"
android:drawable="@drawable/pressed_background_blue" />
</selector>
tôi đã cố gắng áp dụng selector để toàn bộ ListView android:listSelector="@drawable/selector.xml"
và đổ bóng đến mục ListView android:background="@drawable/shadow.xml"
Nhưng trong trường hợp này, mục ListView sẽ có bóng nhưng sẽ không phản ứng khi chạm vào.
Cảm ơn bạn trước
công việc này .. cảm ơn bạn^_ ^ –