Android Reorder Fragment Backstack

后端 未结 2 1460
难免孤独
难免孤独 2020-12-03 03:29

I have a number of pages/fragments listed in my navigation drawer, the user is likely to switch between these frequently and I want them in the backstack so that they can na

2条回答
  •  清歌不尽
    2020-12-03 03:56

    When you want to reuse the fragment before it, just first hide all the fragments and show the desired fragment at a time. By doing this you can reuse your fragments without removing them and without reloading the fragments. But be sure before to implement it you have to add the fragment to backstack.

提交回复
热议问题