SlideShare a Scribd company logo
ListView and Adapters Software Development for Portable Devices  BITS Pilani Goa Campus Sem I 2011-12
CS C314 Software Development For Portable Devices Foundation of :
Problem?? Performance 10,000 entries in a list! Less than 10% shown but fetched completely
Solution?? Populate on Demand Google image search Recycle views to reduce object churn
Android – ListView Its a view capable of displaying  scrollable list of items It only creates views (widget) if needed It recycles views, e.g. if a row is not displayed anymore it will be recycled and only its content will change.
The FLOW diagram
Adapters extends "BaseAdapter“ "ArrayAdapter" can handle data based on Arrays "SimpleCursorAdapter" handle  database  related data Your own "CustomAdapter"
Android - ListActivity If Activity is primarily showing a list you should extend the activity "ListActivity“ It simplifies the handling of a "ListView“ Set Listadapter in the onCreate(), via the method setListAdapter(). Register the click by onListItemClick(ListView l, View v, int position, long id) CS C314 Software Development For Portable Devices
onListItemClick Parameters l : The ListView where the click happened v : The view that was clicked within the ListView position : The position of the view in the list id : The row id of the item that was clicked CS C314 Software Development For Portable Devices
  ListActivity with ArrayAdapter and Android standard layout See the code FirstExample CS C314 Software Development For Portable Devices
   ListActivity with own layout See the code SecondExample Define the layout in xml for each row Define our own arrayAdapter and using Id telling adapter which UI element is the text CS C314 Software Development For Portable Devices
   ListActivity with flexible layout See the code ThirdExample Override getView(). Performance is not optimized.. Think why? CS C314 Software Development For Portable Devices
   Performance Issues Creating Java objects for each row is time and memory consumption.  findViewById() is a expensive operation Android recycles rows (views) which are not displayed anymore. CS C314 Software Development For Portable Devices
   Optimized Way Using existing rows saves memory and CPU consumption . convertView -  The old view to reuse avoid doing findViewById() if not necessary  ViewHolder pattern  175% faster then the older procedure CS C314 Software Development For Portable Devices
   ViewHolder The ViewHolder stores a reference to the required views in a row ViewHolder is then attached to the row via the method setTag() row is recycled we can get the ViewHolder via getTag() method much faster then the repetitive call of findViewById() CS C314 Software Development For Portable Devices
   Optimized way See the code CS C314 Software Development For Portable Devices
Your task Your task is to implement the View holder pattern in the Add food class CS C314 Software Development For Portable Devices
   Interacting rows Your row layout can also contain views which interact with the underlying data model. Example : Checkboxes CS C314 Software Development For Portable Devices
Try Out LongClickListeners Single Vs Multiple selection Header and Footers CS C314 Software Development For Portable Devices
References Spinner tutorial :  http://developer.android.com/resources/tutorials/views/hello-spinner.html ArrayAdapter: http://developer.android.com/resources/tutorials/views/hello-spinner.html CS C314 Software Development For Portable Devices
Ad

Recommended

Android list view tutorial by Javatechig
Android list view tutorial by Javatechig
Javatechig Resources for Developers
 
Android Training (AdapterView & Adapter)
Android Training (AdapterView & Adapter)
Khaled Anaqwa
 
Introduction to Listview in Android
Introduction to Listview in Android
technoguff
 
Android adapters
Android adapters
baabtra.com - No. 1 supplier of quality freshers
 
ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]
Somkiat Khitwongwattana
 
Android ui adapter
Android ui adapter
Krazy Koder
 
Android App Development - 11 Lists, grids, adapters, dialogs and toasts
Android App Development - 11 Lists, grids, adapters, dialogs and toasts
Diego Grancini
 
List Views
List Views
Ahsanul Karim
 
Android Ui
Android Ui
Jetti Chowdary
 
Has Many And Belongs To Many
Has Many And Belongs To Many
guest80d303
 
List adapter with multiple objects
List adapter with multiple objects
baabtra.com - No. 1 supplier of quality freshers
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptx
vishal choudhary
 
Creating EPiServer Usage Reports
Creating EPiServer Usage Reports
Paul Graham
 
Android UI
Android UI
mailalamin
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
Diego Grancini
 
Android Programming.pptx
Android Programming.pptx
vishal choudhary
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextView
Sourabh Sahu
 
Android Layout.pptx
Android Layout.pptx
vishal choudhary
 
Android Layout
Android Layout
mcanotes
 
Basic Android Layout
Basic Android Layout
Bayu Firmawan Paoh
 
ASP.net Image Slideshow
ASP.net Image Slideshow
Hock Leng PUAH
 
[Android] Using Selection Widgets
[Android] Using Selection Widgets
Nikmesoft Ltd
 
Hilt Annotations
Hilt Annotations
Ali Göktaş
 
Animal Project
Animal Project
Ahmed Ali
 
Lab2-android
Lab2-android
Lilia Sfaxi
 
Ember.js Self Defining Apps
Ember.js Self Defining Apps
Oli Griffiths
 
Android development - ListView & Adapter
Android development - ListView & Adapter
Lope Emano
 
Android tutorial points
Android tutorial points
bsb_2209
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgets
Prajyot Mainkar
 

More Related Content

What's hot (19)

Android Ui
Android Ui
Jetti Chowdary
 
Has Many And Belongs To Many
Has Many And Belongs To Many
guest80d303
 
List adapter with multiple objects
List adapter with multiple objects
baabtra.com - No. 1 supplier of quality freshers
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptx
vishal choudhary
 
Creating EPiServer Usage Reports
Creating EPiServer Usage Reports
Paul Graham
 
Android UI
Android UI
mailalamin
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
Diego Grancini
 
Android Programming.pptx
Android Programming.pptx
vishal choudhary
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextView
Sourabh Sahu
 
Android Layout.pptx
Android Layout.pptx
vishal choudhary
 
Android Layout
Android Layout
mcanotes
 
Basic Android Layout
Basic Android Layout
Bayu Firmawan Paoh
 
ASP.net Image Slideshow
ASP.net Image Slideshow
Hock Leng PUAH
 
[Android] Using Selection Widgets
[Android] Using Selection Widgets
Nikmesoft Ltd
 
Hilt Annotations
Hilt Annotations
Ali Göktaş
 
Animal Project
Animal Project
Ahmed Ali
 
Lab2-android
Lab2-android
Lilia Sfaxi
 
Ember.js Self Defining Apps
Ember.js Self Defining Apps
Oli Griffiths
 
Has Many And Belongs To Many
Has Many And Belongs To Many
guest80d303
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptx
vishal choudhary
 
Creating EPiServer Usage Reports
Creating EPiServer Usage Reports
Paul Graham
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
Diego Grancini
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextView
Sourabh Sahu
 
Android Layout
Android Layout
mcanotes
 
ASP.net Image Slideshow
ASP.net Image Slideshow
Hock Leng PUAH
 
[Android] Using Selection Widgets
[Android] Using Selection Widgets
Nikmesoft Ltd
 
Animal Project
Animal Project
Ahmed Ali
 
Ember.js Self Defining Apps
Ember.js Self Defining Apps
Oli Griffiths
 

Viewers also liked (18)

Android development - ListView & Adapter
Android development - ListView & Adapter
Lope Emano
 
Android tutorial points
Android tutorial points
bsb_2209
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgets
Prajyot Mainkar
 
Adapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListView
Yuki Anzai
 
Layouts in android
Layouts in android
Durai S
 
Developing Applications for Android - Lecture#1
Developing Applications for Android - Lecture#1
Usman Chaudhry
 
Adapter and cache technique
Adapter and cache technique
Hoang Vy Nguyen
 
Android sync adapter
Android sync adapter
Alex Tumanoff
 
Android ui part 2
Android ui part 2
Paramvir Singh
 
Android Application Fundamentals.
Android Application Fundamentals.
Skillwise Consulting
 
Android Session 6 - UI Part 1
Android Session 6 - UI Part 1
Paramvir Singh
 
Post-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android Ecosystem
Michael Genkin
 
Android 5.0, Lollipop
Android 5.0, Lollipop
LOGISTIC INFOTECH PVT LTD
 
Android ui layout
Android ui layout
Krazy Koder
 
Android life cycle
Android life cycle
瑋琮 林
 
Basic android-ppt
Basic android-ppt
Srijib Roy
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 
Google ART (Android RunTime)
Google ART (Android RunTime)
Niraj Solanke
 
Android development - ListView & Adapter
Android development - ListView & Adapter
Lope Emano
 
Android tutorial points
Android tutorial points
bsb_2209
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgets
Prajyot Mainkar
 
Adapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListView
Yuki Anzai
 
Layouts in android
Layouts in android
Durai S
 
Developing Applications for Android - Lecture#1
Developing Applications for Android - Lecture#1
Usman Chaudhry
 
Adapter and cache technique
Adapter and cache technique
Hoang Vy Nguyen
 
Android sync adapter
Android sync adapter
Alex Tumanoff
 
Android Session 6 - UI Part 1
Android Session 6 - UI Part 1
Paramvir Singh
 
Post-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android Ecosystem
Michael Genkin
 
Android ui layout
Android ui layout
Krazy Koder
 
Android life cycle
Android life cycle
瑋琮 林
 
Basic android-ppt
Basic android-ppt
Srijib Roy
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 
Google ART (Android RunTime)
Google ART (Android RunTime)
Niraj Solanke
 
Ad

Similar to Lecture Slides for List Views [Android ] (20)

MDAD 4 - Lists, adapters and recycling
MDAD 4 - Lists, adapters and recycling
Alexandru Radovici
 
MDAD 5 - Android - Lists, adapters and recycling
MDAD 5 - Android - Lists, adapters and recycling
Alexandru Radovici
 
Hello Android
Hello Android
Trong Dinh
 
HIT3328 - Chapter03 - Simple Interactive Apps
HIT3328 - Chapter03 - Simple Interactive Apps
Yhal Htet Aung
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
HIT3328 - Chapter0601 - Menus and Lists
HIT3328 - Chapter0601 - Menus and Lists
Yhal Htet Aung
 
Day 5 android app code advancement
Day 5 android app code advancement
FatimaYousif11
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and Techniques
Edgar Gonzalez
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
Marakana Inc.
 
Adapter and adapter views that are used in android
Adapter and adapter views that are used in android
JinalBhagat2
 
Android layouts course-in-mumbai
Android layouts course-in-mumbai
vibrantuser
 
Workshop 04 android-development
Workshop 04 android-development
Aravindharamanan S
 
EESTEC Android Workshop 2
EESTEC Android Workshop 2
Antonis Kalipetis
 
Android layouts course-in-mumbai
Android layouts course-in-mumbai
vibrantuser
 
Android activities & views
Android activities & views
ma-polimi
 
DevFest Sul 2014 - Android 4 lazy iOS Devs
DevFest Sul 2014 - Android 4 lazy iOS Devs
Jackson F. de A. Mafra
 
Android - Build User Interface
Android - Build User Interface
MingHo Chang
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
Visug
 
Dinosaurs and Androids: The Listview Evolution
Dinosaurs and Androids: The Listview Evolution
Fernando Cejas
 
Building your first android app using Xamarin
Building your first android app using Xamarin
Gill Cleeren
 
MDAD 4 - Lists, adapters and recycling
MDAD 4 - Lists, adapters and recycling
Alexandru Radovici
 
MDAD 5 - Android - Lists, adapters and recycling
MDAD 5 - Android - Lists, adapters and recycling
Alexandru Radovici
 
HIT3328 - Chapter03 - Simple Interactive Apps
HIT3328 - Chapter03 - Simple Interactive Apps
Yhal Htet Aung
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
HIT3328 - Chapter0601 - Menus and Lists
HIT3328 - Chapter0601 - Menus and Lists
Yhal Htet Aung
 
Day 5 android app code advancement
Day 5 android app code advancement
FatimaYousif11
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and Techniques
Edgar Gonzalez
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
Marakana Inc.
 
Adapter and adapter views that are used in android
Adapter and adapter views that are used in android
JinalBhagat2
 
Android layouts course-in-mumbai
Android layouts course-in-mumbai
vibrantuser
 
Workshop 04 android-development
Workshop 04 android-development
Aravindharamanan S
 
Android layouts course-in-mumbai
Android layouts course-in-mumbai
vibrantuser
 
Android activities & views
Android activities & views
ma-polimi
 
DevFest Sul 2014 - Android 4 lazy iOS Devs
DevFest Sul 2014 - Android 4 lazy iOS Devs
Jackson F. de A. Mafra
 
Android - Build User Interface
Android - Build User Interface
MingHo Chang
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
Visug
 
Dinosaurs and Androids: The Listview Evolution
Dinosaurs and Androids: The Listview Evolution
Fernando Cejas
 
Building your first android app using Xamarin
Building your first android app using Xamarin
Gill Cleeren
 
Ad

Recently uploaded (20)

Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 

Lecture Slides for List Views [Android ]

  • 1. ListView and Adapters Software Development for Portable Devices BITS Pilani Goa Campus Sem I 2011-12
  • 2. CS C314 Software Development For Portable Devices Foundation of :
  • 3. Problem?? Performance 10,000 entries in a list! Less than 10% shown but fetched completely
  • 4. Solution?? Populate on Demand Google image search Recycle views to reduce object churn
  • 5. Android – ListView Its a view capable of displaying scrollable list of items It only creates views (widget) if needed It recycles views, e.g. if a row is not displayed anymore it will be recycled and only its content will change.
  • 7. Adapters extends "BaseAdapter“ "ArrayAdapter" can handle data based on Arrays "SimpleCursorAdapter" handle database related data Your own "CustomAdapter"
  • 8. Android - ListActivity If Activity is primarily showing a list you should extend the activity "ListActivity“ It simplifies the handling of a "ListView“ Set Listadapter in the onCreate(), via the method setListAdapter(). Register the click by onListItemClick(ListView l, View v, int position, long id) CS C314 Software Development For Portable Devices
  • 9. onListItemClick Parameters l : The ListView where the click happened v : The view that was clicked within the ListView position : The position of the view in the list id : The row id of the item that was clicked CS C314 Software Development For Portable Devices
  • 10.   ListActivity with ArrayAdapter and Android standard layout See the code FirstExample CS C314 Software Development For Portable Devices
  • 11.   ListActivity with own layout See the code SecondExample Define the layout in xml for each row Define our own arrayAdapter and using Id telling adapter which UI element is the text CS C314 Software Development For Portable Devices
  • 12.   ListActivity with flexible layout See the code ThirdExample Override getView(). Performance is not optimized.. Think why? CS C314 Software Development For Portable Devices
  • 13.   Performance Issues Creating Java objects for each row is time and memory consumption. findViewById() is a expensive operation Android recycles rows (views) which are not displayed anymore. CS C314 Software Development For Portable Devices
  • 14.   Optimized Way Using existing rows saves memory and CPU consumption . convertView - The old view to reuse avoid doing findViewById() if not necessary ViewHolder pattern 175% faster then the older procedure CS C314 Software Development For Portable Devices
  • 15.   ViewHolder The ViewHolder stores a reference to the required views in a row ViewHolder is then attached to the row via the method setTag() row is recycled we can get the ViewHolder via getTag() method much faster then the repetitive call of findViewById() CS C314 Software Development For Portable Devices
  • 16.   Optimized way See the code CS C314 Software Development For Portable Devices
  • 17. Your task Your task is to implement the View holder pattern in the Add food class CS C314 Software Development For Portable Devices
  • 18.   Interacting rows Your row layout can also contain views which interact with the underlying data model. Example : Checkboxes CS C314 Software Development For Portable Devices
  • 19. Try Out LongClickListeners Single Vs Multiple selection Header and Footers CS C314 Software Development For Portable Devices
  • 20. References Spinner tutorial : http://developer.android.com/resources/tutorials/views/hello-spinner.html ArrayAdapter: http://developer.android.com/resources/tutorials/views/hello-spinner.html CS C314 Software Development For Portable Devices

Editor's Notes

  • #10: position is the clicked element's position in your Adapter (so you can doadapter.getItem(position) ) row id is the id that corresponds to that element, what your Adapter returns in the getItemId()method.