Hi all,
Following is the Adapter I create; I'm sure it must be the problem of the
adapter, but i don't know what is wrong in it ; my app can be start ,but
it only can running for a while ,then the Eclipse Logcat tell me the
error::
ERROR/JavaBinder(1496): java.lang.RuntimeException: No memory in memObj
I hope your help , I really don't know why, HELP!!!!!
THANK YOU!!!!








you can also tell me by email
---zxxjjforever@gmail.com!
private class ContactListItemAdapter extends ResourceCursorAdapter {
public ContactListItemAdapter(Context context, int layout, Cursor c) {
super(context, layout, c);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
System.out.println(" bindView");
final ContactListItemCache cache = (ContactListItemCache) view
.getTag();
TextView nameView = cache.nameView;
QuickContactBadge photoView = cache.photoView;
nameView.setText(cursor.getString(SUMMARY_NAME_COL UMN_INDEX));
final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX);
final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY);
int photoid = cursor.getInt(SUMMARY_PHOTO_ID_COLUMN_INDEX);
photoView.setMode(QuickContact.MODE_SMALL);
photoView.assignContactUri(Contacts.getLookupUri(c ontactId,
lookupKey));
if (getPhoto(context, photoid) != null) {
photoView.setImageDrawable(getPhoto(context, photoid));
} else {
photoView.setImageResource(R.drawable.ic_contact_p icture);
}
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
View view = super.newView(context, cursor, parent);
ContactListItemCache cache = null;
cache = new ContactListItemCache();
cache.nameView = (TextView) view.findViewById(R.id.name);
cache.photoView = (QuickContactBadge) view.findViewById(R.id.badge);
view.setTag(cache);
System.out.println("View newView");
return view;
}
}
static class ContactListItemCache {
public TextView nameView;
public QuickContactBadge photoView;
ContactListItemCache() {
System.out.println("ContactListItemCache");
}
}