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

后端 未结 10 1500
悲&欢浪女
悲&欢浪女 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条回答
  •  猫巷女王i
    2020-11-27 05:44

    Back button will traverse in the order, in which Fragments were added to backstack. This is provided as a navigation function by default. Now if you want to go to specific Fragment, you can show it from backstack.

提交回复
热议问题