Communication objects between multiple fragments in ViewPager

前端 未结 7 1323
不知归路
不知归路 2021-02-07 06:53

I have 5 fragments in ViewPager used to fill business object with several fields step by step, in each step some of those fields will be set. I\'ve read many articl

7条回答
  •  南笙
    南笙 (楼主)
    2021-02-07 07:29

    make your objects parcelable and then pass it to other fragments using bundle. i.e bundle.putParcelable(obj) parcelable is very efficient and fast.

    it should motivate you

    http://www.developerphil.com/parcelable-vs-serializable/

提交回复
热议问题