Chapter 4. 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 you through the activities related to creating and populating a ListView, which includes the following topics:

  • Creating the POIApp activity layout
  • Creating a custom list row item layout
  • The ListView and ListAdapter classes
  • Extending BaseAdapter to provide data to the ListView widget
  • Working with web services in Xamarin.Android
  • Working with the ActionBar menu options
  • Handling list item click events
  • Handling the network state

Creating the POI ListView layout

It is technically possible to create and attach the user interface elements to your activity using C# code. However, it is a bit of a mess. We will go with ...

Get Xamarin Mobile Application Development for Android - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.