I\'m using android listview and its working perfectly fine. my implementation as below
ListView listview = (ListView)findViewById(R.id.list);
setListAdapter(new
Well from you code where you are using
setListAdapter(adapter);
indicates that you are using ListActivity
, and while using ListActivity
you get your list as follow:
listView = this.getListView();
or you can use
listView = this.findViewById(android.R.id.list);
and you are using
listView = this.findViewById(R.id.list);
which is wrong in case of ListActivity
, and ListView
cannot be found and results in NullPointerException
.