Comp 4521 muppala android ui overview 18 wheres the

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: key is pressed An area of a touch screen is touched, etc. Gestures COMP 4521 (Muppala) Android UI Overview 13 Par7cipants in an OO - Event Driven System •  Event Source –  Objects that generate events, e.g. bu8ons •  Event –  Represent occurences, changes of state or requests which a program might need to handle –  Store all event- specific informa7on (e.g. mouseEvent: x/y coordinates) •  Handler (Listener) –  Objects that respond to events –  Provide the code needed to handle the event COMP 4521 (Muppala) Android UI Overview 14 Participants in an OO - Event Driven System Event Source Listener Event ButtonEvent e){ (e.g. button) COMP 4521 (Muppala) Public void buttonClicked( … } Android UI Overview 15 Registering Listeners •  The listener must be known to the event source, such that the event can be sent •  Listener is registered •  Listeners speci...
View Full Document

This document was uploaded on 03/12/2014.

Ask a homework question - tutors are online