Is View.OnClickListener() a function or interface? When we try to set a onclicklistener() method in android, we use new View.OnClickListener() and it bugs me there cuz as far as I know,
- we don't need to initialize an object of class containing static method inorder to use those methods. Why we do this?
- When we use implements inorder to implement an interface, we don't call the static methods of the interface.
So can some one tell me why do we do:
- new View.OnClickListener(), for using onclick() method?
- Why do we use () with View.OnClickListener if it is an interface?
Thanks for your reply..