Xamarin – ListActivity in Android

In this post we would see what ListActivity is, and how to display data.

As you see in above image, ListActivity is inheriting Activity. It has ListView and ListAdapter properties.

So basically, ListActivity has a ListView, and is for displaying data in a ListView.

Now to display data in ListView we need two things.

  1. A Template XML for ListView
  2. Data to fill


Add an XML file to the Layout folder.



Add a TextView in the XML file.


And as you see in the below image, the Activity1 is inherited from ListActivity class. So we could set the property ListAdapater here.


Now, let’s run the application and see the ListActivity in action


Hope this post helps, thanks for reading.


Full Source Code: Click Here.