In this code i am facing problem to setSelection the list item at position 1. So when the activity starts up i need to get the focus of the list item at position 1.
Using java Syntax Highlighting
- public class GroupList extends ListActivity {
- public static List<String> groupName = new ArrayList<String>();
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- ArrayAdapter <String> fileList = new ArrayAdapter<String> (this,R.layout.grouplist,groupName);
- setListAdapter(fileList);
- }
- public void onStart() {
- super.onStart();
- this.setSelection(1); //Problem....
- }
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Thanks in advance.....



