Ngô Thảo Trúc
Member
How do I find a fragment in an activity?
Answer
Often we need to lookup or find a fragment instance within an activity layout file. There are a few methods for looking up an existing fragment instance: ID – Lookup a fragment by calling findFragmentById on the FragmentManager. Tag – Lookup a fragment by calling findFragmentByTag on the FragmentManager.
Answer
Often we need to lookup or find a fragment instance within an activity layout file. There are a few methods for looking up an existing fragment instance: ID – Lookup a fragment by calling findFragmentById on the FragmentManager. Tag – Lookup a fragment by calling findFragmentByTag on the FragmentManager.