All one can think and do in a short time is to think what one already knows and to do as one has always done!

Android ListView Example - Display a List inside an existing Layout

ListView is ViewGroup that helps create a list of repeating items much like a Scrollable Grid. In this example we have defined a List inside an existing Linear Layout with TextViews at the Top and Bottom of the List. To display the List we have to first create an ArrayAdapter from an ArrayList of countries and then set the listView adatpter to the ArrayAdapter using the listView.setAdapter() method. The OnItemClickListener attached to the ListView helps identify the country that was clicked.

Source for application variables - strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Android ListView</string>
<string name="some_text">
Just some random Text inside our view before we display a list.
We are going to display some North American Countries!
</string>
</resources>