I need to help for this question on Android Studio.
How can I jump to an fragment by pressing the back button? We don't add any button. Just clicking the back button on an android phone.
For example:
- I am going from activity_main to fragment1
- I am going from fragment1 to fragment2
- When I press the back button, I want to jump to activity_main, not fragment1.