How to send an object from one Android Activity to another using Intents?

后端 未结 30 3593
-上瘾入骨i
-上瘾入骨i 2020-11-21 04:47

How can I pass an object of a custom type from one Activity to another using the putExtra() method of the class Intent?

30条回答
  •  北荒
    北荒 (楼主)
    2020-11-21 05:07

    Easiest and java way of doing is : implement serializable in your pojo/model class

    Recommended for Android for performance view: make model parcelable

提交回复
热议问题