What is the use of addToBackStack in Android?

Phạm Quyết

New member
What is the use of addToBackStack in Android?
Answer
By calling addToBackStack(), the replace transaction is saved to the back stack so the user can reverse the transaction and bring back the previous fragment by pressing the Back button.
 

Tìm kiếm

Back
Top