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

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

    I have also encountered this problem, and found out that it is because recycling views. If i remember right setting this removes recycling and fixes the problem, but it's not the best option here.

    @Override
    public int getItemViewType(int position) {
        return IGNORE_ITEM_VIEW_TYPE;
    }
    

提交回复
热议问题