managedQuery - trying to make 2 data points show when clicked
- by fitz
Here is what I have now:
ListAdapter buildPhonesAdapter(Activity a) {
String[] PROJECTION=new String[] { Contacts._ID,
Contacts.DISPLAY_NAME,
Phone.NUMBER,
Email.DATA
};
Cursor c=a.managedQuery(Phone.CONTENT_URI,
PROJECTION, null, null, null);
return(new SimpleCursorAdapter( a,
android.R.layout.simple_list_item_2,
c,
new String[] {
Contacts.DISPLAY_NAME,
Phone.NUMBER,
Email.DATA
},
new int[] {
android.R.id.text1,
android.R.id.text2
}));
}
ListAdapter buildEmailAdapter(Activity a) {
String[] PROJECTION=new String[] { Contacts._ID,
Contacts.DISPLAY_NAME,
Email.DATA
};
Cursor c=a.managedQuery(Email.CONTENT_URI,
PROJECTION, null, null, null);
return(new SimpleCursorAdapter( a,
android.R.layout.simple_list_item_2,
c,
new String[] {
Contacts.DISPLAY_NAME,
Email.DATA
},
new int[] {
android.R.id.text1,
android.R.id.text2
}));
}
Need the 2 variables to show when cursor is picking this new option - I need Email.CONTENT_URI, and Phone.CONTENT_URI, to show when picked - I can get each one to show but need them both to show at same time.