Search in sources :

Example 11 with SimpleCursorAdapter

use of android.widget.SimpleCursorAdapter in project cw-omnibus 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);
}
Also used : SimpleCursorAdapter(android.widget.SimpleCursorAdapter)

Example 12 with SimpleCursorAdapter

use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.

the class CalendarQueryActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    adapter = new SimpleCursorAdapter(this, R.layout.row, null, ROW_COLUMNS, ROW_IDS);
    adapter.setViewBinder(this);
    setListAdapter(adapter);
    getLoaderManager().initLoader(0, null, this);
}
Also used : SimpleCursorAdapter(android.widget.SimpleCursorAdapter)

Example 13 with SimpleCursorAdapter

use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.

the class NewContactsAdapterBridge method buildEmailAdapter.

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 }));
}
Also used : SimpleCursorAdapter(android.widget.SimpleCursorAdapter) Cursor(android.database.Cursor)

Example 14 with SimpleCursorAdapter

use of android.widget.SimpleCursorAdapter in project cw-advandroid by commonsguy.

the class NewContactsAdapterBridge method buildPhonesAdapter.

ListAdapter buildPhonesAdapter(Activity a) {
    String[] PROJECTION = new String[] { Contacts._ID, Contacts.DISPLAY_NAME, Phone.NUMBER };
    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 }, new int[] { android.R.id.text1, android.R.id.text2 }));
}
Also used : SimpleCursorAdapter(android.widget.SimpleCursorAdapter) Cursor(android.database.Cursor)

Example 15 with SimpleCursorAdapter

use of android.widget.SimpleCursorAdapter in project cw-omnibus 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);
}
Also used : SimpleCursorAdapter(android.widget.SimpleCursorAdapter)

Aggregations

SimpleCursorAdapter (android.widget.SimpleCursorAdapter)60 Cursor (android.database.Cursor)37 ListAdapter (android.widget.ListAdapter)16 ListView (android.widget.ListView)13 AlphaAnimation (android.view.animation.AlphaAnimation)6 Animation (android.view.animation.Animation)6 AnimationSet (android.view.animation.AnimationSet)6 LayoutAnimationController (android.view.animation.LayoutAnimationController)6 TranslateAnimation (android.view.animation.TranslateAnimation)6 View (android.view.View)4 Test (org.junit.Test)3 Intent (android.content.Intent)2 Uri (android.net.Uri)2 TextView (android.widget.TextView)2 ContentResolver (android.content.ContentResolver)1 ContentValues (android.content.ContentValues)1 MatrixCursor (android.database.MatrixCursor)1 Drawable (android.graphics.drawable.Drawable)1 OnClickListener (android.view.View.OnClickListener)1 LayoutParams (android.view.ViewGroup.LayoutParams)1