Sylvester Steele wrote:
> I get a null pointer exception I think the contactsAdapter is null.
Actually, that shouldn't be possible. You create contactsAdapter via a
direct call to the SimpleCursorAdapter constructor. That means your null
pointer exception either:
-- occurs before the constructor call, in which case contactsAdapter
isn't in scope yet
-- occurs during the constructor call, in which case contactsAdapter
still isn't in scope yet
-- occurs after the constructor call, in which case contactsAdapter will
be properly filled in, since the constructor executed without error
I suspect your problem may be a variation of the one from my response to
your subsequent message -- try fixing the tempInt array to have the
correct view ID. In this case, since your view for the rows is set to be
android.R.layout.simple_list_item_1, tempInt should probably be set to
new int[] {android.R.id.text1}.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ -- Available Now!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---