I have an Android project that uses a library project (all of which I built). I am using ADT/SDK v14 and I need to access the main class in the main project and call a function when a dialog in the library project is dismissed. Now, I can do that if I add a reference to my main project to the library project, but that isn't ideal. How do I get a reference to a class in my main project from a class in the library project?
This is how it's working:
Anyone have any ideas?
Thanks, Ed
How do I get a reference to a class in my main project from a class in the library project?
Ideally, you don't.
Instead, you:
The only way to literally "get a reference to a class in my main project from a class in the library project" is via reflection, which is slow and makes for difficult-to-maintain code.
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