use of android.widget.SimpleCursorAdapter in project cw-omnibus by commonsguy.
the class OldContactsAdapterBridge method buildPhonesAdapter.
SpinnerAdapter buildPhonesAdapter(Activity a) {
String[] PROJECTION = new String[] { Contacts.Phones._ID, Contacts.Phones.NAME, Contacts.Phones.NUMBER };
String[] ARGS = { String.valueOf(Contacts.Phones.TYPE_MOBILE) };
Cursor c = a.managedQuery(Contacts.Phones.CONTENT_URI, PROJECTION, Contacts.Phones.TYPE + "=?", ARGS, Contacts.Phones.NAME);
SimpleCursorAdapter adapter = new SimpleCursorAdapter(a, android.R.layout.simple_spinner_item, c, new String[] { Contacts.Phones.NAME }, new int[] { android.R.id.text1 });
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
return (adapter);
}
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);
getContentResolver().call(Provider.Constants.CONTENT_URI, Provider.SET_KEY_METHOD, "sekrit", null);
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);
}
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);
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class OldContactsAdapterBridge method buildNameAdapter.
ListAdapter buildNameAdapter(Activity a) {
String[] PROJECTION = new String[] { Contacts.People._ID, Contacts.PeopleColumns.NAME };
Cursor c = a.managedQuery(Contacts.People.CONTENT_URI, PROJECTION, null, null, Contacts.People.DEFAULT_SORT_ORDER);
return (new SimpleCursorAdapter(a, android.R.layout.simple_list_item_1, c, new String[] { Contacts.PeopleColumns.NAME }, new int[] { android.R.id.text1 }));
}
use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.
the class CPProxyConsumerActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
adapter = new SimpleCursorAdapter(this, R.layout.row, null, new String[] { CallLog.Calls.NUMBER, CallLog.Calls.DATE }, new int[] { R.id.number, R.id.date });
adapter.setViewBinder(this);
setListAdapter(adapter);
getLoaderManager().initLoader(0, null, this);
}
Aggregations