Which transaction method swaps the current tab's fragment for a new one?
- add()
- replace()
- detach()
- hide()
Answer
B) replace()
replace() removes the current fragment in the container and adds the new one.
Computer Science MCQ · More Lab: Bottom Navigation with Fragments MCQs · Practise