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

后端 未结 7 738
面向向阳花
面向向阳花 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:17

    A correction about the answer given by @JasonRobinson:

    if(selectedIds.contains(pos) {
             selectedIds.remove(pos); -> **selectedIds.remove(selectedIds.indexOf(pos));**
         }
         else {
             selectedIds.add(pos);
         }
    

提交回复
热议问题