Add (not replace) fragment with navigation architecture component

后端 未结 6 1881
失恋的感觉
失恋的感觉 2021-01-31 02:14

I have an activity with a product list fragment and many other fragments and I am trying to use architecture component navigation controller.

The problem is: it replaces

6条回答
  •  借酒劲吻你
    2021-01-31 02:40

    After searching a bit, it's not possible, but the problem itself can be solved with viewmodel and livedata or rxjava. So fragment state is kept after transactions and my product list will not reload each time

提交回复
热议问题