How can I make my custom objects Parcelable?

后端 未结 11 2572
旧巷少年郎
旧巷少年郎 2020-11-21 07:40

I\'m trying to make my objects Parcelable. However, I have custom objects and those objects have ArrayList attributes of other custom objects I have made.

11条回答
  •  别那么骄傲
    2020-11-21 08:16

    To put: bundle.putSerializable("key",(Serializable) object);

    To get: List obj = (List)((Serializable)bundle.getSerializable("key"));

    提交回复
    热议问题