0

I'm using ListView with
android:choiceMode="multipleChoice"
and items with
android:background="?android:attr/selectableItemBackground"

While holding finger on item, background is getting darker, but after that background turns into color before clicking on it.
How can I keep background that indicates this item is selected/checked?

Update 1:

So far I've made selector like this:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/abc_list_pressed_holo_light" android:state_checked="true" />
    <item android:drawable="@drawable/abc_list_selector_holo_light" />
</selector>

This is more or less doing what I want but I'm not sure if using directly @drawable/abc_list_selector_holo_light instead of ?android:attr/selectableItemBackground is ok.

Community
  • 1
  • 1
WojciechKo
  • 1,481
  • 17
  • 34

0 Answers0