L_3_2_Android_UI - Android User Interface Overview Most of...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Android’User’Interface’ Overview’ Most’of’the’material’in’this’sec7on’comes’from’ h8p://developer.android.com/guide/topics/ui/index.html’
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Android’User’Interface’ User’interface’built’using’ views’and’ viewgroup’ objects’ View’ Base’class’for’widgets’ Textboxes,’ EditText’boxes,’ bu8ons,’…’ Viewgroup’ Base’class’for’layouts’ Linear,’Rela7ve,’Tabular,’…’ View’Hierarchy’ Hierarchy’of’views’and’ viewgroups’ viewgroup’ viewgroup’ view’ view’ view’ view’ view’ COMP 4521 (Muppala) Android UI Overview 2
Background image of page 2
User’Interface’Events’ User's’interac7on’with’views/widgets’generate’events,’ requiring’you’to’perform’ac7ons’in’response’to’the’events’ To’be’informed’of’UI’events,’you’need’to’do’one’of’two’ things:’ DeFne’an’event’listener’and’register’it’with’the’View’ More’oPen’than’not,’this’is’how’you'll’listen’for’events’ The’View’class’contains’a’collec7on’of’nested’interfaces’named’ On <something> Listener,’each’with’a’callback’method’called’ On <something> ().’E.g.,’ OnClickListener(),’ OnKeyListener(),’…’ Override’an’exis7ng’callback’method’for’the’View’ This’is’what’you’should’do’when’you've’implemented’your’own’View’ class’and’want’to’listen’for’speciFc’events’that’occur’within’it’ COMP 4521 (Muppala) Android UI Overview 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Event-Driven Programming
Background image of page 4
Programming Embedded Systems Characteristics often asynchronous simultaneous inputs & outputs sequences unknowable, re-orderable no end or exit Inputs: sensors (switches, light sensors, voltages, etc.) timers user inputs (keypad, push-buttons) Outputs: update a display move something switch something on or off in general CHANGE SOMETHING PHYSICAL COMP 4521 (Muppala) Android UI Overview 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Tradi7onal’Program’Structure’ Open’characterized’by:’ In±ut’from’keyboard’or’data’Fle’ Begins,’±erforms’o±era7ons,’then’ends’(linear’±rogram)’ Decisions’made’don t’change’fundamental’±rogram’structure’ Out±ut’to’monitor’or’data’Fle’ COMP 4521 (Muppala) Android UI Overview 6
Background image of page 6
Sequen7al’Programming ’ In’sequen7al’programs,’the’program’is’under’control’ The’user’is’required’to’synchronize’with’the’program:’ Program’tells’user’it s’ready’for’more’input’ User’enters’more’input’and’it’is’processed’ While’…’if’then…’structures’highly’deFne’the’user s’path’ through’the’program’ Program’is’predeFned’with’respect’to’7me’ Handling’of’sequen7ally’independent’commands’requires’ enormous’amount’of’work’ COMP 4521 (Muppala) Android UI Overview 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

Page1 / 51

L_3_2_Android_UI - Android User Interface Overview Most of...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online