Teams Winter 2011/team1/Android/Adding Functionality to Main Screen Elements
3. Adding Functionality to Main Screen Elements
3.1. Inside the ContractList
class create a String array:
protected String[] studentList = { "Anastasia Semionova", "Minoo Ziaei", "Ladan Zadeh", "Sergiu Ecob" };
3.2. Populate the listView on the main screen:
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, studentList); ListView contactsList = (ListView) findViewById(R.id.listView1); contactsList.setAdapter(adapter);