Page 16 - Xamarin Android Application Development
P. 16

ListView                                                                                    12
























               Add a TextView in the XML file. This is for ListView template.













               And as you see in the below image, the Activity1 is inherited from Activity class unlike our last
               post where we inherited from ListActivity. Rest of the code is self-explanatory. We are setting the
               Adapter property of the ListView with ArrayAdapter.















               Now, let’s run the application and see the ListActivity in action.
   11   12   13   14   15   16   17   18   19   20   21