How can two fragments communicate?

Linh Chi

New member
How can two fragments communicate?
Answer
Communicating with fragments
  1. Table of contents.
  2. Share data using a ViewModel. Share data with the host activity. Share data between fragments.
  3. Get results using the Fragment Result API. Pass results between fragments. Pass results between parent and child fragments. Receive results in the host activity.
 

Tìm kiếm

Back
Top