I have also tried:
activity.setContentView(R.layout.contacts);
Cursor C = activity.getContentResolver().query(People.CONTENT_URI,
null, null, null, null);
activity.startManagingCursor(C);
String[] columns = new String[] {People.NAME};
int[] names = new int[] {R.id.contactsList};
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(activity,
R.layout.contacts, C, columns, names);
ListView contactsList=
(ListView)activity.findViewById(R.id.contactsList);
contactsList.setAdapter(mAdapter);
Here is gives me an exception saying: ListView is not a view that can be
bounds by this simpleCursorAdapter.
Please help.
Thanks,
Sylvester