G mouseevent xy coordinates handler listener objects

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: No preemp7on of event handlers. •  Handlers generally short- lived. COMP 4521 (Muppala) Android UI Overview Event Loop Event Handlers 11 What Are Events Used For? •  Mostly GUIs: –  One handler for each event (press bu8on, invoke menu entry, etc.). –  Handler implements behavior (undo, delete file, etc.). •  Distributed systems: –  One handler for each source of input (socket, etc.). –  Handler processes incoming request, sends response. –  Event- driven I/O for I/O overlap. COMP 4521 (Muppala) Android UI Overview 12 Event Driven Programming •  Instead of a user synchronizing with the program, the program synchronizes with, or reacts to, the user •  All communica7on from user to computer occurs via EVENTS and the code that handles the events •  An event is an ac7on that happens in the system –  –  –  –  A bu8on pressed or released A...
View Full Document

Ask a homework question - tutors are online