views:

3874

answers:

1

I have a class not extend from ListActivity, so how can I replace this code without error?

SimpleCursorAdapter adapter = 
   new SimpleCursorAdapter(this, R.layout.sbooks_row, cursor, from, to );
  setListAdapter(adapter);
+1  A: 
ListView myList=(ListView)findViewById(android.R.id.list);

myList.setAdapter(adapter);
CommonsWare
Thanks, now it has no error!
Dennie