use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class NewContactsAdapterBridge method buildNameAdapter.
ListAdapter buildNameAdapter(Activity a) {
String[] PROJECTION = new String[] { Contacts._ID, Contacts.DISPLAY_NAME };
Cursor c = a.managedQuery(Contacts.CONTENT_URI, PROJECTION, null, null, null);
return (new SimpleCursorAdapter(a, android.R.layout.simple_list_item_1, c, new String[] { Contacts.DISPLAY_NAME }, new int[] { android.R.id.text1 }));
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class OldContactsAdapterBridge method buildPhonesAdapter.
ListAdapter buildPhonesAdapter(Activity a) {
String[] PROJECTION = new String[] { Contacts.Phones._ID, Contacts.Phones.NAME, Contacts.Phones.NUMBER };
Cursor c = a.managedQuery(Contacts.Phones.CONTENT_URI, PROJECTION, null, null, Contacts.Phones.DEFAULT_SORT_ORDER);
return (new SimpleCursorAdapter(a, android.R.layout.simple_list_item_2, c, new String[] { Contacts.Phones.NAME, Contacts.Phones.NUMBER }, new int[] { android.R.id.text1, android.R.id.text2 }));
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class OldContactsAdapterBridge method buildEmailAdapter.
ListAdapter buildEmailAdapter(Activity a) {
String[] PROJECTION = new String[] { Contacts.ContactMethods._ID, Contacts.ContactMethods.DATA, Contacts.PeopleColumns.NAME };
Cursor c = a.managedQuery(Contacts.ContactMethods.CONTENT_EMAIL_URI, PROJECTION, null, null, Contacts.ContactMethods.DEFAULT_SORT_ORDER);
return (new SimpleCursorAdapter(a, android.R.layout.simple_list_item_2, c, new String[] { Contacts.PeopleColumns.NAME, Contacts.ContactMethods.DATA }, new int[] { android.R.id.text1, android.R.id.text2 }));
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class ConstantsBrowser method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
constantsCursor = managedQuery(Provider.Constants.CONTENT_URI, PROJECTION, null, null, null);
ListAdapter adapter = new SimpleCursorAdapter(this, R.layout.row, constantsCursor, new String[] { Provider.Constants.TITLE, Provider.Constants.VALUE }, new int[] { R.id.title, R.id.value });
setListAdapter(adapter);
registerForContextMenu(getListView());
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class ConstantsBrowser method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
adapter = new SimpleCursorAdapter(this, R.layout.row, null, new String[] { Provider.Constants.TITLE, Provider.Constants.VALUE }, new int[] { R.id.title, R.id.value });
setListAdapter(adapter);
registerForContextMenu(getListView());
getLoaderManager().initLoader(0, null, this);
}
Aggregations