5

I want my ListView to change its background for each selected item (Multi-Selection). I used this code:

    <ListView
    ...
    android:drawSelectorOnTop="false"
    android:listSelector="@android:color/darker_gray" >

This works fine, but it is just possible to select one single item of the list. If I select another one the selection is resetted and the new one changes its background.

Is there an easy and fast way to make it possible to select more than one item at the same time with changing the background of every selected item?

4

2 回答 2

1

您可以使用

android:choiceMode="multipleChoice"
于 2013-11-06T21:49:44.397 回答
0

您是否尝试将 ArrayAdapter 的资源参数设置为 android.R.layout.simple_list_item_activated_1

于 2013-11-06T20:22:08.140 回答