SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
HIT3328 / HIT8328 Software Development for
Mobile Devices
Dr. Rajesh Vasa, 2011
1
Twitter: @rvasa
Blog: http://rvasa.blogspot.com
Lecture 06
Menus and Lists
R. Vasa, 20112
Lecture Overview
•Working with Menus
•Using Frame Layout
•Adapters and Working with Simple Lists
R. Vasa, 20113
Menus
•Android offers a ‘Menu’ button, iOS does not
•Menus’ can be customised per activity
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, 20114
Creating a Menu
Name App (from Lecture
5)
Menus are defined as a
resource
We can use icons provided by
Android SDK (recommended)
We can use icons provided by
Android SDK (recommended)
R. Vasa, 20115
Menus are Resources
Convention is to place it
in ‘menu’ folder
R. Vasa, 20116
Wiring up a Menu to Show
Call back method that we have to write
Resource Identifier
XML Resource file is converted (inflated)
into a Menu object that will be rendered
(shown) on screen
XML Resource file is converted (inflated)
into a Menu object that will be rendered
(shown) on screen
R. Vasa, 20117
Handling Menu Click
Call back method that we have to write
R. Vasa, 20118
Toasting a Message
•There is often a need to show a message
for a short period and then fade on mobile
devices
•Android offers this via the Toast utility
R. Vasa, 20119
Toasting a Message
On Click
Message
displayed for a
second
R. Vasa, 20111
Creating a Toast
Duration can be customised
Android offers Toast.LENGTH_LONG,
Toast.LENGTH_SHORT as built in defaults
Duration can be customised
Android offers Toast.LENGTH_LONG,
Toast.LENGTH_SHORT as built in defaults
R. Vasa, 20111
Lecture Roadmap - Where are
we?
•Working with Menus
•Using Frame Layout
•Adapters and Working with Simple Lists
R. Vasa, 20111
Frame Layout Offers Overlays
•We often need a way to overlay multiple
views (or layouts) on top of each other
•Often with variation in transparency
•Frame Layout offers us this feature
•Frame Layout is also used to help create
Tab Panes in Android
R. Vasa, 20111
Simple Frame Layout (Light
Bulb)
Button is placed on top of Image View
n / Off Images are also placed on top of each othe
R. Vasa, 20111
Frame Layout - Code
2 Image Views and 1 Button in the same layout
R. Vasa, 20111
Frame Layout - Code
We control visibility explicitlyWe control visibility explicitly
R. Vasa, 20111
Light Bulb Logic
We flip the visibility of the images
Method is triggered onClickMethod is triggered onClick
R. Vasa, 20111
Lecture Roadmap - Where are
we?
•Working with Menus
•Using Frame Layout
•Adapters and Working with Simple
Lists
R. Vasa, 20111
A Simple List App.
Displays Latitude and Longitude of a location
R. Vasa, 20111
Constituents of a List based
screen
ListView
Text Views
R. Vasa, 20112
Lists get data via an Adapter
ListView
Data Source
Adapter
R. Vasa, 20112
Adapter Formats Data for
Display
ListView
Data Source
Adapter
Data is formatted for
display via customised
layout attached to the
Adapter
Data is formatted for
display via customised
layout attached to the
Adapter
R. Vasa, 20112
List Views are very flexible
We specify the
layout for each line
item of a list
Layout can be provided
as a resource file (XML)
R. Vasa, 20112
Adapter Feeds data to List
View
ListView
Data Source
Adapter
Data Source feeds data
to the Adapter for
formatting
Data Source feeds data
to the Adapter for
formatting
R. Vasa, 20112
Adapter Offers Separation of
Concerns
ListView
Data Source
Adapter
Data Source can be an
array, collection object,
external database, or an
external server
Data Source can be an
array, collection object,
external database, or an
external server
R. Vasa, 20112
Simple List App.
ListView
Data Source
Adapter
Domain Model:
HashMap (Cities, Location)
(Cities names)
(Simple Item
Layout)
R. Vasa, 20112
Domain Model
Ideally, you read an external resource
(Above data is hard-coded to illustrate concept)
R. Vasa, 20112
Wiring up Data - Adapter -
ListView
Activity extends ListActivity
We are using an Array Adapter
(others are available / you can
provide your own)
R. Vasa, 20112
Wiring up Data - Adapter -
ListView
We are using SDK provided layout style
(we can also write our own as an Layout XML)
R. Vasa, 20112
Wiring up Data - Adapter -
ListView
We are setting the data source to use
R. Vasa, 20113
Wiring up Data - Adapter -
ListView
Tell the List View to display from adapter
R. Vasa, 20113
Wiring up Data - Adapter -
ListView
Only one ListView can receive
data via the default
setListAdapter in an Activity
R. Vasa, 20113
Activity Layout
ListView that will receive data
provided via setListAdapter
R. Vasa, 20113
Activity Layout
ListView that will receive data
provided via setListAdapter
Special
built-in
identifier
Special
built-in
identifier
R. Vasa, 20113
Handling List Click Event
This call back is provided by the
parent (List Activity) class -- we
override it
This call back is provided by the
parent (List Activity) class -- we
override it
R. Vasa, 20113
But, what about complex lists?
Key concepts are the
same
We will cover it later in
depth
(if you are curious, look at examples
online)
R. Vasa, 20113
Lecture Summary
•Working with Menus
•Using Frame Layout
•Adapters and Working with Simple Lists

Weitere ähnliche Inhalte

Ähnlich wie HIT3328 - Chapter0601 - Menus and Lists

Ähnlich wie HIT3328 - Chapter0601 - Menus and Lists (20)

Application fundamentals
Application fundamentalsApplication fundamentals
Application fundamentals
 
ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]
 
Android ui with xml
Android ui with xmlAndroid ui with xml
Android ui with xml
 
Internet data in mobile applications
Internet data in mobile applicationsInternet data in mobile applications
Internet data in mobile applications
 
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDBAWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
 
Cesar Valiente "Unidirectional architecture on Android with Kotlin"
Cesar Valiente "Unidirectional architecture on Android with Kotlin"Cesar Valiente "Unidirectional architecture on Android with Kotlin"
Cesar Valiente "Unidirectional architecture on Android with Kotlin"
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
What is ado .net architecture_.pdf
What is ado .net architecture_.pdfWhat is ado .net architecture_.pdf
What is ado .net architecture_.pdf
 
Android resources in android-chapter9
Android resources in android-chapter9Android resources in android-chapter9
Android resources in android-chapter9
 
R hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functionsR hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functions
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
 
Introduction to Oracle Financials
Introduction to Oracle FinancialsIntroduction to Oracle Financials
Introduction to Oracle Financials
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-
 
"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2
 
Localization and Shared Preferences in android
Localization and Shared Preferences in androidLocalization and Shared Preferences in android
Localization and Shared Preferences in android
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 
R Course Online
R Course OnlineR Course Online
R Course Online
 
Abap dictionary 1
Abap dictionary 1Abap dictionary 1
Abap dictionary 1
 
Abap dictionary 1
Abap dictionary 1Abap dictionary 1
Abap dictionary 1
 

Mehr von Yhal Htet Aung

HIT3328 - Chapter0702 - Navigation Flow and Design Approach
HIT3328 - Chapter0702 - Navigation Flow and Design ApproachHIT3328 - Chapter0702 - Navigation Flow and Design Approach
HIT3328 - Chapter0702 - Navigation Flow and Design Approach
Yhal Htet Aung
 
HIT3328 - Chapter02 - Foundation and Tools
HIT3328 - Chapter02 - Foundation and ToolsHIT3328 - Chapter02 - Foundation and Tools
HIT3328 - Chapter02 - Foundation and Tools
Yhal Htet Aung
 
HIT3328 - Chapter01 - Platforms and Devices
HIT3328 - Chapter01 - Platforms and DevicesHIT3328 - Chapter01 - Platforms and Devices
HIT3328 - Chapter01 - Platforms and Devices
Yhal Htet Aung
 

Mehr von Yhal Htet Aung (15)

HIT3328 - Chapter0702 - Navigation Flow and Design Approach
HIT3328 - Chapter0702 - Navigation Flow and Design ApproachHIT3328 - Chapter0702 - Navigation Flow and Design Approach
HIT3328 - Chapter0702 - Navigation Flow and Design Approach
 
HIT3328 - Chapter02 - Foundation and Tools
HIT3328 - Chapter02 - Foundation and ToolsHIT3328 - Chapter02 - Foundation and Tools
HIT3328 - Chapter02 - Foundation and Tools
 
HIT3328 - Chapter01 - Platforms and Devices
HIT3328 - Chapter01 - Platforms and DevicesHIT3328 - Chapter01 - Platforms and Devices
HIT3328 - Chapter01 - Platforms and Devices
 
CSC1100 - Chapter11 - Programming Languages and Program Development
CSC1100 - Chapter11 - Programming Languages and Program DevelopmentCSC1100 - Chapter11 - Programming Languages and Program Development
CSC1100 - Chapter11 - Programming Languages and Program Development
 
CSC1100 - Chapter10 - Information System
CSC1100 - Chapter10 - Information SystemCSC1100 - Chapter10 - Information System
CSC1100 - Chapter10 - Information System
 
CSC1100 - Chapter09 - Computer Security, Ethics and Privacy
CSC1100 - Chapter09 - Computer Security, Ethics and PrivacyCSC1100 - Chapter09 - Computer Security, Ethics and Privacy
CSC1100 - Chapter09 - Computer Security, Ethics and Privacy
 
CSC1100 - Chapter08 - Database Management
CSC1100 - Chapter08 - Database ManagementCSC1100 - Chapter08 - Database Management
CSC1100 - Chapter08 - Database Management
 
CSC1100 - Chapter07 - Communications & Networks
CSC1100 - Chapter07 - Communications & NetworksCSC1100 - Chapter07 - Communications & Networks
CSC1100 - Chapter07 - Communications & Networks
 
CSC1100 - Chapter06 - Operating System & Utility Programs
CSC1100 - Chapter06 - Operating System & Utility ProgramsCSC1100 - Chapter06 - Operating System & Utility Programs
CSC1100 - Chapter06 - Operating System & Utility Programs
 
CSC1100 - Chapter05 - Storage
CSC1100 - Chapter05 - StorageCSC1100 - Chapter05 - Storage
CSC1100 - Chapter05 - Storage
 
CSC1100 - Chapter04 - Output
CSC1100 - Chapter04 - OutputCSC1100 - Chapter04 - Output
CSC1100 - Chapter04 - Output
 
CSC1100 - Chapter03 - Input
CSC1100 - Chapter03 - InputCSC1100 - Chapter03 - Input
CSC1100 - Chapter03 - Input
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System Unit
 
CSC1100 - Chapter01 - Overview of Using Computers
CSC1100 - Chapter01 - Overview of Using ComputersCSC1100 - Chapter01 - Overview of Using Computers
CSC1100 - Chapter01 - Overview of Using Computers
 
CSC1100 - Chapter12 - Flow Charts
CSC1100 - Chapter12 - Flow ChartsCSC1100 - Chapter12 - Flow Charts
CSC1100 - Chapter12 - Flow Charts
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

HIT3328 - Chapter0601 - Menus and Lists

  • 1. HIT3328 / HIT8328 Software Development for Mobile Devices Dr. Rajesh Vasa, 2011 1 Twitter: @rvasa Blog: http://rvasa.blogspot.com Lecture 06 Menus and Lists
  • 2. R. Vasa, 20112 Lecture Overview •Working with Menus •Using Frame Layout •Adapters and Working with Simple Lists
  • 3. R. Vasa, 20113 Menus •Android offers a ‘Menu’ button, iOS does not •Menus’ can be customised per activity 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)
  • 4. R. Vasa, 20114 Creating a Menu Name App (from Lecture 5) Menus are defined as a resource We can use icons provided by Android SDK (recommended) We can use icons provided by Android SDK (recommended)
  • 5. R. Vasa, 20115 Menus are Resources Convention is to place it in ‘menu’ folder
  • 6. R. Vasa, 20116 Wiring up a Menu to Show Call back method that we have to write Resource Identifier XML Resource file is converted (inflated) into a Menu object that will be rendered (shown) on screen XML Resource file is converted (inflated) into a Menu object that will be rendered (shown) on screen
  • 7. R. Vasa, 20117 Handling Menu Click Call back method that we have to write
  • 8. R. Vasa, 20118 Toasting a Message •There is often a need to show a message for a short period and then fade on mobile devices •Android offers this via the Toast utility
  • 9. R. Vasa, 20119 Toasting a Message On Click Message displayed for a second
  • 10. R. Vasa, 20111 Creating a Toast Duration can be customised Android offers Toast.LENGTH_LONG, Toast.LENGTH_SHORT as built in defaults Duration can be customised Android offers Toast.LENGTH_LONG, Toast.LENGTH_SHORT as built in defaults
  • 11. R. Vasa, 20111 Lecture Roadmap - Where are we? •Working with Menus •Using Frame Layout •Adapters and Working with Simple Lists
  • 12. R. Vasa, 20111 Frame Layout Offers Overlays •We often need a way to overlay multiple views (or layouts) on top of each other •Often with variation in transparency •Frame Layout offers us this feature •Frame Layout is also used to help create Tab Panes in Android
  • 13. R. Vasa, 20111 Simple Frame Layout (Light Bulb) Button is placed on top of Image View n / Off Images are also placed on top of each othe
  • 14. R. Vasa, 20111 Frame Layout - Code 2 Image Views and 1 Button in the same layout
  • 15. R. Vasa, 20111 Frame Layout - Code We control visibility explicitlyWe control visibility explicitly
  • 16. R. Vasa, 20111 Light Bulb Logic We flip the visibility of the images Method is triggered onClickMethod is triggered onClick
  • 17. R. Vasa, 20111 Lecture Roadmap - Where are we? •Working with Menus •Using Frame Layout •Adapters and Working with Simple Lists
  • 18. R. Vasa, 20111 A Simple List App. Displays Latitude and Longitude of a location
  • 19. R. Vasa, 20111 Constituents of a List based screen ListView Text Views
  • 20. R. Vasa, 20112 Lists get data via an Adapter ListView Data Source Adapter
  • 21. R. Vasa, 20112 Adapter Formats Data for Display ListView Data Source Adapter Data is formatted for display via customised layout attached to the Adapter Data is formatted for display via customised layout attached to the Adapter
  • 22. R. Vasa, 20112 List Views are very flexible We specify the layout for each line item of a list Layout can be provided as a resource file (XML)
  • 23. R. Vasa, 20112 Adapter Feeds data to List View ListView Data Source Adapter Data Source feeds data to the Adapter for formatting Data Source feeds data to the Adapter for formatting
  • 24. R. Vasa, 20112 Adapter Offers Separation of Concerns ListView Data Source Adapter Data Source can be an array, collection object, external database, or an external server Data Source can be an array, collection object, external database, or an external server
  • 25. R. Vasa, 20112 Simple List App. ListView Data Source Adapter Domain Model: HashMap (Cities, Location) (Cities names) (Simple Item Layout)
  • 26. R. Vasa, 20112 Domain Model Ideally, you read an external resource (Above data is hard-coded to illustrate concept)
  • 27. R. Vasa, 20112 Wiring up Data - Adapter - ListView Activity extends ListActivity We are using an Array Adapter (others are available / you can provide your own)
  • 28. R. Vasa, 20112 Wiring up Data - Adapter - ListView We are using SDK provided layout style (we can also write our own as an Layout XML)
  • 29. R. Vasa, 20112 Wiring up Data - Adapter - ListView We are setting the data source to use
  • 30. R. Vasa, 20113 Wiring up Data - Adapter - ListView Tell the List View to display from adapter
  • 31. R. Vasa, 20113 Wiring up Data - Adapter - ListView Only one ListView can receive data via the default setListAdapter in an Activity
  • 32. R. Vasa, 20113 Activity Layout ListView that will receive data provided via setListAdapter
  • 33. R. Vasa, 20113 Activity Layout ListView that will receive data provided via setListAdapter Special built-in identifier Special built-in identifier
  • 34. R. Vasa, 20113 Handling List Click Event This call back is provided by the parent (List Activity) class -- we override it This call back is provided by the parent (List Activity) class -- we override it
  • 35. R. Vasa, 20113 But, what about complex lists? Key concepts are the same We will cover it later in depth (if you are curious, look at examples online)
  • 36. R. Vasa, 20113 Lecture Summary •Working with Menus •Using Frame Layout •Adapters and Working with Simple Lists