passing arrays using bundle in android

后端 未结 5 1773
没有蜡笔的小新
没有蜡笔的小新 2020-12-28 19:19

I need to pass an array of String/integer values from one Activity to another. How do I achieve this?

5条回答
  •  醉酒成梦
    2020-12-28 19:46

    I have never passed an array using a bundle, and I do not know off the top of my head if it can be done, but you can certainly pass an ArrayList (or anything Serializable/Parcelable). See this question for a more complete answer:

    Passing data of a non-primitive type between activities in android

提交回复
热议问题