Hi,
I am writing my first Android application and have some problems with handing around context objects. A lot of methods/constructors seem to require the current context (activity) which causes me some problems in my action listeners. Instead of having all my listeners and handlers as anonymous classes in the activity class I have created classes for each event I would like to handle. For example a button buttonRegister would be initialized as:
buttonRegister.setOnClickListener(new RegisterButtonClickAction());
However when doing this I have no access to the current context object inside my listener. I could hand over a current context as a constructor parameter but I am not sure whether this is the best choice. What is the "best practice" for creating handler/listeners in Android or working with context objects in general?
Thanks,
b3n