How to pass an object from one activity to another on Android

后端 未结 30 4077
遇见更好的自我
遇见更好的自我 2020-11-21 04:03

I am trying to work on sending an object of my customer class from one Activity and display it in another Activity.

The code for t

30条回答
  •  攒了一身酷
    2020-11-21 05:06

    I used to set object with Pacelable or Serializable to transfer, but whenever I add other variables to object(model), I have to register it all. It's so nconvenient.

    It's super easy to transfer object between activities or fragments.

    Android DataCache

提交回复
热议问题