How to put a List in intent

后端 未结 5 1912
无人共我
无人共我 2020-11-29 11:28

I have a List in one of my activities and need to pass it to the next activity.

private List selectedData;  

I tried putting

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 12:19

    i think ur item should be parcelable. and you should use arraylist instead of list. then use intent.putParcelableArrayListExtra

提交回复
热议问题