how to go back to previous fragment on pressing manually back button of individual fragment?

后端 未结 10 1497
悲&欢浪女
悲&欢浪女 2020-11-27 04:49

I have only one activity and multiple fragments in my application.

Two main fragment A(left) and B(right).



        
10条回答
  •  被撕碎了的回忆
    2020-11-27 05:26

    You have to implement your own backstack implementation as explained here.

    You can call the popFragments() whenever you click the back button in a fragment and call pushFragments() whenever you navigate from one Fragment to other.

提交回复
热议问题