[`View.OnClickListener` is an interface][1], you don't call it, but creates a new instance of it (`new View.OnClickListener()` is a call to the constructor)
The instance you create is of [anonymous class][2] that `implements` `View.OnClickListener`, in the brackets right under `new View.OnClickListener()`
Any class that implements `View.OnClickListener` must implement the methods declared in it (e.g. [onClick][3])
`setOnClickListener` just saves the reference to the View.OnClickListener instance you supplied, and when someone clicks the button, the `onClick` method of the listener you set is getting called.
[1]: http://developer.android.com/reference/android/view/View.OnClickListener.html
[2]: http://docstore.mik.ua/orelly/java-ent/jnut/ch03_12.htm
[3]: http://developer.android.com/reference/android/view/View.OnClickListener.html#onClick%28android.view.View%29
[`View.OnClickListener` is an interface][1], you don't call it, but creates a new instance of it (`new View.OnClickListener()` is a call to the constructor)
The instance you create is of [anonymous class][2] that `implements` `View.OnClickListener`, in the brackets right under `new View.OnClickListener()`
Any class that implements `View.OnClickListener` must implement the methods declared in it (e.g. [onClick][3])
`setOnClickListener` just saves the reference to the View.OnClickListener instance you supplied, and when someone clicks the button, the `onClick` method of the listener you set is getting called.
[1]: http://developer.android.com/reference/android/view/View.OnClickListener.html
[2]: http://docstore.mik.ua/orelly/java-ent/jnut/ch03_12.htm
[3]: http://developer.android.com/reference/android/view/View.OnClickListener.html#onClick%28android.view.View%29