Around 2 days ago, i found out about the DexClassLoader Library by Android. As a rather mediocre programmer i have a few questions regarding this library/class/tool. The questions i have mainly focus on this Documentation:
It states, that it loads a external .jar or .apk file. Now lets assume i have my Project as follow:
com.me -->src ---->main ---->fragment1 ---->fragment2 -->layout ---->layout_main ---->layout_fragment1 ---->layout_fragment2
How exactly would i now extract fragment1 with its corresponding layout into an .jar or .apk file, that my DexClassLoader can implement this file. And more importantly how do i transform these into such a file.
How do i implement all the functions i do have in my module (the exported Fragment)? I am guessing it is via an Interface, but i am neither sure, nor have found a good example online, as it kind of seems, as if it is a kind of underused feature.
- Quiet similar to point 2, but how do i display this Fragment. If it is solved via an Interface, then i dont really have a way to call
getFragmentManager().beginTransaction().add(R.id.smthng,Fragment1).commit();
Thanks for any sort of answer regarding any of these questions :) If i have more questions i will update this post. Cheers
Jacobus