1
package org.anddev.android.listviews;
2
3
import android.app.ListActivity;
4
import android.os.Bundle;
5
import android.widget.ArrayAdapter;
6
7
public class ListViewDemo extends ListActivity
{
8
/** *//** Called when the activity is first created. */
9
@Override
10
public void onCreate(Bundle icicle)
{
11
super.onCreate(icicle);
12
// Create an array of Strings, that will be put to our ListActivity
13
String[] mStrings = new String[]
{"Android", "Google", "Eclipse"};
14
15
// Create an ArrayAdapter, that will actually make the Strings above appear in the ListView
16
this.setListAdapter(new ArrayAdapter<String>(this,
17
android.R.layout.simple_list_item_1, mStrings));
18
}
19
}

2

3

4

5

6

7



8


9

10



11

12

13



14

15

16

17

18

19
