Slide 1

Slide 1 text

Android - ListView http://www.technotalkative.com/ http://about.me/paresh.mayani @pareshmayani

Slide 2

Slide 2 text

Simple ListView http://www.TechnoTalkative.com

Slide 3

Slide 3 text

Fancy ListView http://www.TechnoTalkative.com

Slide 4

Slide 4 text

Custom ListView http://www.TechnoTalkative.com Step 1: create XML layout for ListView. Step 2: Create Row file for ListView items Step 3: Create custom adapter for ListView Step 4: Create MainActivity.java file Download: http://www.technotalkative.com/android- asynchronous-image-loading-in-listview/

Slide 5

Slide 5 text

Custom ListView http://www.TechnoTalkative.com Step - 1: create XML layout for ListView.

Slide 6

Slide 6 text

Custom ListView http://www.TechnoTalkative.com Step - 2: Create Row file for ListView items

Slide 7

Slide 7 text

Custom ListView http://www.TechnoTalkative.com 3) Create custom adapter by extending BaseAdapter or ArrayAdapter

Slide 8

Slide 8 text

Follow ViewHolder pattern http://www.TechnoTalkative.com

Slide 9

Slide 9 text

Asynchronous image loading (Lazy loading of images) http://www.TechnoTalkative.com Download libraries available: 1) https://github.com/thest1/LazyList 2) Universal Image Loader for Android => https://github.com/nostra13/Android-Universal- Image-Loader 3) Novoda’s Image Loader https://github.com/novoda/ImageLoader

Slide 10

Slide 10 text

Remember attributes http://www.TechnoTalkative.com Android listview produces black highlighting over text when scrolling. How to stop this? => android:cacheColorHint="@android:color/transparent” How can i display drawable or color to draw between list items? => android:divider="@android:color/transparent“ How can i increase/decrease height of the divider? android:dividerHeight="10dp“ How can i set drawable to indicate the currently selected item in the list? => android:listSelector="@android:color/transparent"