O'Reilly logo

Xamarin Mobile Application Development for Android by Mark Reynolds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Populating the ListView item

There are a number of ways to populate a ListView item within the Android platform; they all work with some type of adapter, meaning a subtype of BaseAdapter or some type of class that implements the IListAdapter interface. For simple lists, you will commonly see the use of ArrayAdapter<T>.

We will create a subtype of BaseAdapter<T> as it meets our specific need, works well in many scenarios, and allows for the use of our custom layout.

Shared instance of IPOIDataService

Prior to creating the adapter, we need to consider how we will get access to an instance of the data service since it will be the source of our POI data. As you may recall from Chapter 4, Creating a Data Storage Mechanism, we simply created an instance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required