Items are not populated in the list view
<ListView
android:id="@+id/titleListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</ListView>
String[] monthsArray = { "JAN", "FEB", "MAR", "APR", "MAY", "JUNE", "JULY",
"AUG", "SEPT", "OCT", "NOV", "DEC" };
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, monthsArray);
titleListView.setAdapter(adapter);
This is my array Array adapter code...
And the above one is the layout code for list view.
I have one array of string called "Months array" and i need to show this
as a list view.
No comments:
Post a Comment