Can't pass an ArrayList to an activity

前端 未结 2 1148
渐次进展
渐次进展 2021-01-19 03:03

This is the code

ArrayList list = new ArrayList();
list.add(new MyObject());
Intent intent = new Intent(this, ReceiverActivit         


        
2条回答
  •  悲哀的现实
    2021-01-19 03:38

    USe i.putParcelableArrayListExtra(name, value) where i is your intent. Dont use putExtra() for a parcelable ArrayList.

提交回复
热议问题