Professional Documents
Culture Documents
Lecture Overview
R. Vasa, 2011
Menus
Menus have a label and an icon Icon is strongly recommended by the Android UI guidelines
Menu
Icons at different resolutions should be provided (ideally)
R. Vasa, 2011
Creating a Menu
Name App (from Lecture 5)
R. Vasa, 2011
R. Vasa, 2011
Resource Identier
XML Resource le is converted (inated) into a Menu object that will be rendered (shown) on screen
6
R. Vasa, 2011
R. Vasa, 2011
Toasting a Message
There is often a need to show a message for a short period and then fade on mobile devices
R. Vasa, 2011
Toasting a Message
On Click
R. Vasa, 2011
Creating a Toast
10
R. Vasa, 2011
11
R. Vasa, 2011
We often need a way to overlay multiple views (or layouts) on top of each other
12
R. Vasa, 2011
Button is placed on top of Image View On / Off Images are also placed on top of each other
13
R. Vasa, 2011
R. Vasa, 2011
R. Vasa, 2011
R. Vasa, 2011
17
R. Vasa, 2011
18
R. Vasa, 2011
ListView
19
R. Vasa, 2011
ListView
Adapter
20
R. Vasa, 2011
ListView
Adapter
Data is formatted for display via customised layout attached to the Adapter
21
R. Vasa, 2011
We specify the layout for each line item of a list Layout can be provided as a resource le (XML)
22
R. Vasa, 2011
ListView
Adapter
R. Vasa, 2011
ListView
Adapter
Data Source can be an array, collection object, external database, or an external server
24
R. Vasa, 2011
ListView
25
Domain Model
R. Vasa, 2011
R. Vasa, 2011
We are using SDK provided layout style (we can also write our own)
28
R. Vasa, 2011
R. Vasa, 2011
30
R. Vasa, 2011
Only one ListView can receive data via the default setListAdapter
31
R. Vasa, 2011
Activity Layout
R. Vasa, 2011
Activity Layout
Special built-in identier ListView that will receive data provided via setListAdapter
33
R. Vasa, 2011
This call back is provided by the parent (List Activity) class -- we override it
34
R. Vasa, 2011
35
R. Vasa, 2011
Lecture Summary
36
R. Vasa, 2011