I have a button in my app that I need to watch for click events.
When it's clicked I need to call a method that takes a Context and a String as its parameters.
The problem is that I cannot access context from within the inner class OnClickListener
Using java Syntax Highlighting
- final Button filterButton = (Button) findViewById(R.id.filtered);
- filterButton.setOnClickListener(new View.OnClickListener()
- {
- public void onClick(View v)
- {
- listType = "filtered";
- createList(a context, a string) //createList takes a context and a string as its params
- }
- });
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
Does anyone know of a way to do this?
Thanks in advance.

