Select multiple items from listview and change color of selected item only

后端 未结 7 739
面向向阳花
面向向阳花 2020-12-30 13:40

I want to make a view where I can select multiple items from listview and also side by side am changing the color of selected list item and saving that item into my arraylis

7条回答
  •  无人及你
    2020-12-30 14:10

    Keep track of the items selected in the listView in the Activity. In the getView of the adapter check if position equals selected position in the listview and setBackgroundColor for the view there. This will work.

提交回复
热议问题