I have put this in my application and it works just fine when I put it at the start of the onCreate method but it won't work if I put it in an onClick listener as per my code below.
Button saveButton = (Button) findViewById(R.id.button2);
saveButton.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
WriteSettings(this,settings);
}
});
I get the message: The method WriteSettings(Context, String) in the type NewCustomer is not applicable for the arguments (new View.OnClickListener(){}, String)
Can anybody point me in the right direction?



