I\'m always using onclick() event in most of my projects. But, I read about OnClickListener(). Can anyone tell what\'s the difference between these
OnClickListener is the interface you need to implement and can be set to a view in java code.
Lately android added a xml attribute to views called android:onclick, that can be used to handle clicks directly in the view's activity without need to implement any interface.
Both function the same way, just that one gets set through java code and the other through xml code.