You also have to be careful about setting background colors and 9patch images on a List View, read this for more information.
This tutorial will show you how to use List View to display selectable lists of non trivial data, using complex cell renderers. You can attach a variety of data models to it and load different display layouts (cell renderers). Items in a Table Layout are not ‘selectable’ (unless they are buttons or text areas that support keyboard focus), however, each row of a List View can be selected. You can attach item selection listeners to a List View to know when the user focuses in on a particular row of a list.
In this tutorial, I will show you how to extend create your own Adapter from scratch, and create your own cell renderers from scratch as well. What’s the difference between a Table Layout and a List View?
The biggest difference between a Swing JList and a List View is that the model view controller separation in JList is not there in List View.
A List View’s adapter, holds all the list’s underlying data as well as the Views necessary to render each row of the List View.
However, there are many similarities with JList, for example, when your underlying data model changes, you have to fire an event to notify the adapter’s listeners that the underlying data has changed, and the views should be refreshed.
The List View does not need to be added to a Scroll View since it automatically supports scrolling.
You have to be careful between touch mode and D-pad mode input into a List View, read this for more information.
This affects the way your List View will respond to user input by touch or by D-Pad movement, the gist of it is use the on Click Listener to respond to user input, which will work for D-Pad as well as touch input events.
The Hashtable value for this key (zipcode) contains the current temperature, humidity, and an icon that represents the weather conditions. The List View and adapter work together to display a list of these weather conditions for various zip codes.