Listeners onclick from viewonclicklistener this is

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: la) Android UI Overview 19 Where’s the ‘MAIN’ ? •  The advantage: –  The OS can op7mize the processing 7me for managing the loop very efficiently –  The OS provides the management, the programmer only writes (and registers) listeners COMP 4521 (Muppala) Android UI Overview 20 Event Driven Programming •  Typically two different classes of events –  User- ini7ated events •  Events that result directly from a user ac7on •  e.g., mouse click, move mouse, bu8on press –  System- ini7ated events •  Events created by the system, as it responds to a user ac7on •  e.g., scrolling text, re- drawing a window COMP 4521 (Muppala) Android UI Overview 21 Problems With Events •  Long- running handlers make applica7on non- responsive. –  Fork off subprocesses for long- running things (e.g. mul7media), use events to find out when done. –  Break up handlers (e.g. event- driven I/O). –...
View Full Document

This document was uploaded on 03/12/2014.

Ask a homework question - tutors are online