Passing enum or object through an intent (the best solution)

前端 未结 15 937
时光取名叫无心
时光取名叫无心 2020-12-04 05:41

I have an activity that when started needs access to two different ArrayLists. Both Lists are different Objects I have created myself.

Basically I need a way to pa

15条回答
  •  渐次进展
    2020-12-04 06:03

    I think your best bet is going to be to convert those lists into something parcelable such as a string (or map?) to get it to the Activity. Then the Activity will have to convert it back to an array.

    Implementing custom parcelables is a pain in the neck IMHO so I would avoid it if possible.

提交回复
热议问题