DEV Community

Discussion on: Navigation Component: How to pass data between fragments using Bundle and ViewModel

Collapse
 
kulloveth profile image
Loveth Nwokike

sorry for the late reply, navigation and communication are two different things so I am assuming you mean communication. if you decide to use viewModel for communication between two fragments then they must be attached to same activity but you can as well use Bundle as an alternative when viewModel is not possible