如何将二维阵列传递到Android中的碎片?
我使用Android导航切换片段。我想传递arrayList< arraylist< myparcelable>>
在bundle
中。我该怎么做?
I use android navigation to switch fragments. I want to pass something like ArrayList<ArrayList<MyParcelable>>
within Bundle
. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Bundle
是一个键值存储,可容纳许多数据结构。但是,对于arrayList&lt; arrayList&lt; myparcelable&gt; gt;
的特定内容,我建议将对象(JSON)序列化以用捆绑包包装,然后在另一端进行审理。Bundle
is a key-value store that accommodates many data structures out of the box. However for something as specific asArrayList<ArrayList<MyParcelable>>
I would recommend serializing the object (JSON) to package it with the Bundle, then deserializing it on the other end.