Add (not replace) fragment with navigation architecture component

后端 未结 6 1878
失恋的感觉
失恋的感觉 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:42

    @Rainmaker is right in my opinion, I did the same thing. We can also save the recycler view position/state in onSaveInstanceState in order to return to the same recycler view position when navigating back to the list fragment.

提交回复
热议问题