Can anybody help me to display the following arraylist in a listview.I am struck with this. [E000199, E000100, ER008,EW999,EQ333,EQ111,E9089,E1001,E777,E999,E0123,E00054,E0032,E0016,E0016, E009, E008,E007,E005,E003,E001].
This is the response I get from a webservice.When I try to display it in a listview in another activity I am getting error as
java.lang.IllegalStateException: System services not available to Activities before onCreate().
pls help me.this is my code in second activity.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
listview = (ListView) findViewById(R.id.listView1);
}
public void sendList(ArrayList<String> list) {
// TODO Auto-generated method stub
this.emp_list=list;
System.out.println("^^^^^^"+emp_list);
adapt = new ArrayAdapter<String>(this,R.layout.list,R.id.title,emp_list);
listview.setAdapter(adapt);
setContentView(R.layout.viewlist);
}