Use FragmentManager to find your Fragment and let it interact with other classes by constructing an interface. Of course, you can directly obtain the Fragment instance and call its methods.
Fragments can be loaded this way. transaction.replace(R.id.frame, fragment); Just write a set method in the fragment, so that passing the value is simple. I have never tried this kind of writing to death. You can completely use the above method instead
Use FragmentManager to find your Fragment and let it interact with other classes by constructing an interface. Of course, you can directly obtain the Fragment instance and call its methods.
Fragments can be loaded this way. transaction.replace(R.id.frame, fragment); Just write a set method in the fragment, so that passing the value is simple.
I have never tried this kind of writing to death. You can completely use the above method instead
Message bus EventBus, otto or RxBus
The following two methods:
1. Use event bus EventBus or RxBus
2. Write the set method in Fragment