首页 > 代码库 > arcgis Listview

arcgis Listview

private ListView listView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.listview);
final List<String> adapterData = http://www.mamicode.com/new ArrayList();
for (int i = 0; i < 20; i++) {
adapterData.add("ListItem" + i);
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_gallery_item, adapterData);
listView.setAdapter(adapter);
}

arcgis Listview