mButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
//Temp Empty
}
});
Now my main cause of confusion is this View.OnClickListener(){}. From the API, I'm understanding that this is an interface. However, I haven't really seen interfaces declared in such a way before.
Here are my questions:
1. "View.OnClickListener" is an interface correct? OnClickListener extends View?
2. Why are there parentheses after "OnClickListener"? Parameters?
3. Why are there brackets after the parentheses? Overriding the initial onClick method in view?
I'm sorry for asking so much about a little piece code, but thanks for your help!