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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---