Comp 4521 muppala android ui overview event loop event

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: at a 7me) –  Easy to model (flowcharts, state machines) –  Easy to build •  Limita7ons –  Can’t implement complex interac7ons –  Only a small number of features possible –  Interac7on must proceed according to a pre- defined sequence •  To the rescue… Event- driven programming COMP 4521 (Muppala) Android UI Overview 9 Event- driven Programming •  Normal (control flow- based) programming –  Approach •  Start at main() •  Con7nue un7l end of program or exit() •  Event- driven programming –  Unable to predict 7me & occurrence of event –  Approach •  Start with main() •  Build GUI •  Await events (& perform associated computa7on) COMP 4521 (Muppala) Android UI Overview 10 Event- Driven Programming •  One execu7on stream: no CPU concurrency. •  Register interest in events (callbacks). •  Event loop waits for events, invokes handlers. •...
View Full Document

This document was uploaded on 03/12/2014.

Ask a homework question - tutors are online