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

Chapter 5. Adding a List View

In this chapter, we finally get to what many of you have been waiting for, developing the user interface. We will walk through the activities related to creating and populating a list view, which includes the following topics:

  • The ListView and ListAdapter classes
  • Creating the Points of Interest list view layout
  • Extending BaseAdapter<> to provide data to the ListView widget
  • Creating a custom cell layout
  • Handling row selections

Creating the POI ListView layout

When we created the POIApp project, a default layout and activity was created for us. Rather than deleting these, let's give them more appropriate names and remove unnecessary content as follows:

  1. Select main.axml in Resources | Layout.
  2. Right-click on it, select Rename ...

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