Is View.OnClickListener () a function or interface? When we try to set the onclicklistener () method in android, we use the new View.OnClickListener (), and it turns me on there, as far as I know,
- we do not need to initialize the class object containing the static inorder method in order to use these methods. Why are we doing this?
- When we use inorder tools to implement an interface, we do not invoke static methods on the interface.
So can someone tell me why we do:
- new View.OnClickListener (), to use the onclick () method?
- Why do we use () with View.OnClickListener if it is an interface?
Thanks for your reply..
source share