SlideShare a Scribd company logo
http://android.amberfog.com/?p=296
Join room on qicus
bit.ly/androiduii
Listview and Adapter
Arif Akbarul Huda
Android Developer di qiscus
Penulis buku “Livecoding! 9 Aplikasi Android
Buatan Sendiri”
omayib@gmail.com (email) | @omayib (Twitter)
“jika pelukis memilki kanvas untuk mencurahkan imajinasinya,
Maka programmer punya RAM yang bisa di manipulasi sesuai
imajinasi”
Good reference
● javatpoint.com/java-oops-
concepts
● oodesign.com
● c4learn.com
● Livecoding! 9 Aplikasi
Android Buatan Sendiri
Listview and Adapter
Behind the screen
How it works?
● ListView asks adapter “give me a view”
(getView) for each item of the list
● A new View is returned and displayed
Q : what if we have one billion items? Create new
view for each item?
Q : what if we have one billion items? Create new
view for each item?
A : Android caches views for you :)
ListView is designed for scalability and
performance. In practice, this essentially means:
● It tries to do as few view inflations as possible.
● It only paints and lays out children that are (or
are about to become) visible on screencode.
http://lucasr.org/2012/04/05/performance-tips-for-androids-listview/
Listview and Adapter
Add Item Clear
User : add item 1 and dispay it!
ListView : “hey adapter, give me a view..!”
Adapter : “ok, but we don't have”
“i will create a view by inflating selected layout”
“then I will keep this view on my scrapview collection
for use letter”
“wait a seconds..i set your data”
“oke done, there is a view for you”
ListView : “yah! Thanks, render was succedeed”
Item 1
View tag : 001
Add Item Clear
User : add item 2 and dispay it!
ListView : “hey adapter, give me a view..!”
Adapter : “ok, but the view I created before still used
for item 1 so we don't have any stock”
“i will create a view by inflating selected layout (again)”
“then I will keep this view on my scrapview collection
for use letter”
“wait a seconds..i set your data”
“oke done, there is a view for you”
ListView : “yah! Thanks, render was succedeed”
Item 1
Item 2
View tag : 001
View tag : 002
Add Item Clear
User : add item 11 and dispay it!
ListView : “hey adapter, give me a view..!”
Adapter : “i am sorry, the view will come outer space.
We no need to render it”
But I will keep current data (item 11) to set leter after
user scrolling down”
ListView : “oke noted!”
Item 1
Item 2
...
Item 9
Item 10
Item 11
View tag : 001
View tag : 002
View tag : 009
View tag : 010
Add Item Clear
Adapter : “Hei look, user move scrolling up!”
“the view with tag 001 has been released and not
used”
“i will use this view to display current data (item 11)
ListView : “oke rendered!”
Item 2
Item 3
...
Item 10
Item 11
Item 1
View tag : 001
Lets try to practice it!
See project on
https://github.com/omayib/ListviewInspection

More Related Content

PDF
List Views
PDF
Android UI System
PDF
Adapter and cache technique
PDF
Android L08 - Google Maps and Utilities
PDF
Android L02 - Activities and Adapters
PPT
Android UI
PDF
Quick Way to work with Models and Alloy in Appcelerator Titanium
PDF
Basic Android Layout
List Views
Android UI System
Adapter and cache technique
Android L08 - Google Maps and Utilities
Android L02 - Activities and Adapters
Android UI
Quick Way to work with Models and Alloy in Appcelerator Titanium
Basic Android Layout

What's hot (20)

PPTX
Android Layout
PDF
Android app material design from dev's perspective
PDF
Android Lollipop - Webinar vom 11.12.2014
PPT
Alloy backbone
PPTX
Dash of ajax
PPTX
Modules in AngularJs
PPTX
Migrating From Angular 1.x to Angular 2+
PDF
Angular material
PDF
Advance Android Layout Walkthrough
PPTX
Migrating from AngularJS when you can't use the word "Big Bang@
PDF
Introduction To Angular 4 - J2I
PDF
API Integration in Web Application
PDF
Angular components
PDF
How to build integrated, professional enterprise-grade cross-platform mobile ...
PDF
PDF
Designing REST API
PDF
Machine Learning Software Design Pattern with PredictionIO
PDF
Introduce to PredictionIO
PDF
Beyond AngularJS: Best practices and more
PPTX
Starting with angular js
Android Layout
Android app material design from dev's perspective
Android Lollipop - Webinar vom 11.12.2014
Alloy backbone
Dash of ajax
Modules in AngularJs
Migrating From Angular 1.x to Angular 2+
Angular material
Advance Android Layout Walkthrough
Migrating from AngularJS when you can't use the word "Big Bang@
Introduction To Angular 4 - J2I
API Integration in Web Application
Angular components
How to build integrated, professional enterprise-grade cross-platform mobile ...
Designing REST API
Machine Learning Software Design Pattern with PredictionIO
Introduce to PredictionIO
Beyond AngularJS: Best practices and more
Starting with angular js
Ad

Similar to Listview and Adapter (20)

PDF
Dinosaurs and Androids: The Listview Evolution
PPTX
Introduction to Listview in Android
PPT
Android ListView and Custom ListView
PDF
Day 8: Dealing with Lists and ListViews
PPTX
Android Training (AdapterView & Adapter)
PDF
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
PPTX
ListView and Custom ListView on Android Development [Thai]
PPTX
chp 4 UI component hdjdjdduudfinalt.pptx
PDF
Day 8: Dealing with Lists and ListViews
PPTX
List adapter with multiple objects
PDF
Android - Build User Interface
PDF
Android UI Tips, Tricks and Techniques
PDF
Android UI Development: Tips, Tricks, and Techniques
PPTX
MDAD 4 - Lists, adapters and recycling
PDF
Lab2-android
PDF
The Tale of a Smooth RecyclerView
PPTX
MDAD 5 - Android - Lists, adapters and recycling
PPTX
Android course Lesson2
PDF
Tips & Tricks to spice up your Android app
Dinosaurs and Androids: The Listview Evolution
Introduction to Listview in Android
Android ListView and Custom ListView
Day 8: Dealing with Lists and ListViews
Android Training (AdapterView & Adapter)
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
ListView and Custom ListView on Android Development [Thai]
chp 4 UI component hdjdjdduudfinalt.pptx
Day 8: Dealing with Lists and ListViews
List adapter with multiple objects
Android - Build User Interface
Android UI Tips, Tricks and Techniques
Android UI Development: Tips, Tricks, and Techniques
MDAD 4 - Lists, adapters and recycling
Lab2-android
The Tale of a Smooth RecyclerView
MDAD 5 - Android - Lists, adapters and recycling
Android course Lesson2
Tips & Tricks to spice up your Android app
Ad

More from Arif Huda (20)

PDF
Spotify Recommender System
PPTX
Startup Tanpa Mentor, Bisa?
PDF
Introducing Startup 101
PDF
Solusi Mencegah Coding Ruwet
PDF
Bedah Teknologi Semacam Gojek
PDF
Rahasia Mendapatkan Investasi Milyaran Rupiah Sebelum Usia 30 Tahun
PPTX
Membuat Media Edukasi Daring
PDF
Single responsibility pattern
PDF
5 jalan rahasia mewujudkan ide startup
ODP
programmersworld
PDF
5 Langkah Jitu Melejitkan Ide Bisnis Startup
ODP
getting started startup in millenial era
PPTX
Fingertip Detection
PDF
Protocol oriented programming
ODP
an implementation of repository pattern for mobile application
ODP
Inovasi Teknologi Berkemajuan
ODP
Git workflow
PDF
Media pembelajaran audio untuk tunanetra
ODP
Tobe a superstar programmer
ODP
clean code for high quality software
Spotify Recommender System
Startup Tanpa Mentor, Bisa?
Introducing Startup 101
Solusi Mencegah Coding Ruwet
Bedah Teknologi Semacam Gojek
Rahasia Mendapatkan Investasi Milyaran Rupiah Sebelum Usia 30 Tahun
Membuat Media Edukasi Daring
Single responsibility pattern
5 jalan rahasia mewujudkan ide startup
programmersworld
5 Langkah Jitu Melejitkan Ide Bisnis Startup
getting started startup in millenial era
Fingertip Detection
Protocol oriented programming
an implementation of repository pattern for mobile application
Inovasi Teknologi Berkemajuan
Git workflow
Media pembelajaran audio untuk tunanetra
Tobe a superstar programmer
clean code for high quality software

Recently uploaded (20)

PDF
Download FL Studio Crack Latest version 2025 ?
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Transform Your Business with a Software ERP System
PPTX
L1 - Introduction to python Backend.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
medical staffing services at VALiNTRY
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
history of c programming in notes for students .pptx
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Download FL Studio Crack Latest version 2025 ?
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Transform Your Business with a Software ERP System
L1 - Introduction to python Backend.pptx
Nekopoi APK 2025 free lastest update
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
Salesforce Agentforce AI Implementation.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
wealthsignaloriginal-com-DS-text-... (1).pdf
medical staffing services at VALiNTRY
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
history of c programming in notes for students .pptx
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Computer Software and OS of computer science of grade 11.pptx
Advanced SystemCare Ultimate Crack + Portable (2025)
Odoo Companies in India – Driving Business Transformation.pdf
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf

Listview and Adapter

  • 1. http://android.amberfog.com/?p=296 Join room on qicus bit.ly/androiduii Listview and Adapter
  • 2. Arif Akbarul Huda Android Developer di qiscus Penulis buku “Livecoding! 9 Aplikasi Android Buatan Sendiri” [email protected] (email) | @omayib (Twitter) “jika pelukis memilki kanvas untuk mencurahkan imajinasinya, Maka programmer punya RAM yang bisa di manipulasi sesuai imajinasi”
  • 3. Good reference ● javatpoint.com/java-oops- concepts ● oodesign.com ● c4learn.com ● Livecoding! 9 Aplikasi Android Buatan Sendiri
  • 6. How it works? ● ListView asks adapter “give me a view” (getView) for each item of the list ● A new View is returned and displayed
  • 7. Q : what if we have one billion items? Create new view for each item?
  • 8. Q : what if we have one billion items? Create new view for each item? A : Android caches views for you :)
  • 9. ListView is designed for scalability and performance. In practice, this essentially means: ● It tries to do as few view inflations as possible. ● It only paints and lays out children that are (or are about to become) visible on screencode. http://lucasr.org/2012/04/05/performance-tips-for-androids-listview/
  • 11. Add Item Clear User : add item 1 and dispay it! ListView : “hey adapter, give me a view..!” Adapter : “ok, but we don't have” “i will create a view by inflating selected layout” “then I will keep this view on my scrapview collection for use letter” “wait a seconds..i set your data” “oke done, there is a view for you” ListView : “yah! Thanks, render was succedeed” Item 1 View tag : 001
  • 12. Add Item Clear User : add item 2 and dispay it! ListView : “hey adapter, give me a view..!” Adapter : “ok, but the view I created before still used for item 1 so we don't have any stock” “i will create a view by inflating selected layout (again)” “then I will keep this view on my scrapview collection for use letter” “wait a seconds..i set your data” “oke done, there is a view for you” ListView : “yah! Thanks, render was succedeed” Item 1 Item 2 View tag : 001 View tag : 002
  • 13. Add Item Clear User : add item 11 and dispay it! ListView : “hey adapter, give me a view..!” Adapter : “i am sorry, the view will come outer space. We no need to render it” But I will keep current data (item 11) to set leter after user scrolling down” ListView : “oke noted!” Item 1 Item 2 ... Item 9 Item 10 Item 11 View tag : 001 View tag : 002 View tag : 009 View tag : 010
  • 14. Add Item Clear Adapter : “Hei look, user move scrolling up!” “the view with tag 001 has been released and not used” “i will use this view to display current data (item 11) ListView : “oke rendered!” Item 2 Item 3 ... Item 10 Item 11 Item 1 View tag : 001
  • 15. Lets try to practice it! See project on https://github.com/omayib/ListviewInspection