android - How Do I Get The Currently Running Activity In My Application? -


i have class needs access application's main activity, design outside of control cannot pass instance it. purpose dynamically create view , set activity.

is there way me access main activity through static method? or there alternative?

according comments above, maybe need static instance of context initialized in application/activity oncreate?


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -