Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How listeners work [closed]

Tags:

java

android

Can someone please tell me how the listener interface works, when you set a onclicklistener, what really happens in the background?

like image 518
SwiftParser Avatar asked Oct 07 '22 06:10

SwiftParser


1 Answers

The listener you registered gets added to a list of listeners, and when the operating system receives an event (click in this case), it calls the appropriate methods on all the listeners in the list.

like image 175
Wernsey Avatar answered Oct 13 '22 10:10

Wernsey