I have a class that needs to access my application's main activity, but by design outside of my control I cannot pass an instance to it. Its purpose is to dynamically create a view and set it to the activity.
Is there a way for me to access the main activity through a static method? Or is there an alternative?
According to the comments above, maybe you need just static instance of context initialized in Application/Activity onCreate?