I have an activity which has a static method for updating a textfield
. This way I can update this view from another activity.
But now I'm trying to get a Context variable in this static method which is not possible. I've tried declaring a Context variable and initialising it in onCreate ( context = getApplicationContext();)
But still I can't access context in this static method. How is this normally done?
edit: a little bit more information about my situation. I'm starting a countdowntimer
in an activity(a) which updates another activity's(b) ``textfield every second. And it does this by accessing b's setTextField
in a static way..