Hooking up POIListViewAdapter

We have the list layout and adapter ready; let's now proceed to hook up the data in poiListView. We need to switch back to the POIListActivity class and add the following changes:

  1. Declare the following variables inside the POIListActivity class:
    private ListView poiListView;
    private ProgressBar progressBar;
    private List<PointOfInterest> poiListData;
    private POIListViewAdapter poiListAdapter;
  2. Now, in the OnCreate method, instantiate the ListView and ProgressBar:
    poiListView = FindViewById<ListView> (Resource.Id.poiListView);
    progressBar = FindViewById<ProgressBar> (Resource.Id.progressBar);
  3. For now, we will create an Async method that is responsible for downloading the data from the server and displaying it in POIListActivity ...

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.