I have a plugin which is the host of fragment A & B. I export a package using Export-Package header from fragment A. Hopefully I can import that package in fragment B using Import-Package header. But the PDE reports that the dependency is unresolved. Is it possible at all using this scenario ? The following post http://www.eclipse.org/forums/index.php/t/238204/ confirms that it is.
Any help would be greatly appreciated.
Thanks & Regards,
Setya
We can communicate within fragments using the ViewModel. We can also communicate between fragments using Interface.
Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. Step 3 − Create two FragmentActivity and add the codes which are given below.
Fragments are also capable of hosting one or more child fragments. Inside a fragment, you can get a reference to the FragmentManager that manages the fragment's children through getChildFragmentManager() . If you need to access its host FragmentManager , you can use getParentFragmentManager() .
The scenario described is perfectly possible in runtime, however PDE is not aware of the dependency at build time. You need to add the header Eclipse-ExtensibleAPI: true
to the host bundle of fragment A.
To reiterate, this header is only used at build time by PDE and is not an OSGi header.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With