Java Code Examples for android.widget.AlphabetIndexer#setCursor()
The following examples show how to use
android.widget.AlphabetIndexer#setCursor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PatientListFragment.java From sana.mobile with BSD 3-Clause "New" or "Revised" License | 6 votes |
public Cursor index(Cursor cursor) { if (cursor != null) { mRowStates = new int[cursor.getCount()]; mAlphaIndexer = new AlphabetIndexer(cursor, 1, mAlphabet); mAlphaIndexer.setCursor(cursor); Arrays.fill(mRowStates, STATE_UNKNOWN); } else { mRowStates = new int[0]; mAlphaIndexer = null; } if (mRowStates.length > 0) mRowStates[0] = STATE_LABELED; return cursor; }
Example 2
Source File: PatientListFragment.java From sana.mobile with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void init(Cursor c) { if (c == null) { return; } //mWrapper = new PatientWrapper(c); //c.setNotificationUri(context.getContentResolver(), Patients.CONTENT_URI); mRowStates = new int[c.getCount()]; Arrays.fill(mRowStates, STATE_UNKNOWN); if (mRowStates.length > 0) mRowStates[0] = STATE_LABELED; mAlphaIndexer = new AlphabetIndexer(c, 1, mAlphabet); mAlphaIndexer.setCursor(c); }
Example 3
Source File: AlphabetIndexerCursorAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 5 votes |
public AlphabetIndexerCursorAdapter(Bundle savedInstanceState, Context context, Cursor cursor) { super(savedInstanceState, context, R.layout.mca__simple_list_item_checkable_1, cursor, FROM, TO, 0); // Sets a new cursor as the data set and resets the cache of indices. int columnIndex = cursor.getColumnIndex(BuildingsContract.NAME); alphabetIndexer = new AlphabetIndexer(cursor, columnIndex, " ABCDEFGHIJKLMNOPQRTSUVWXYZ"); alphabetIndexer.setCursor(cursor); }
Example 4
Source File: AlphabetIndexerCursorAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 5 votes |
public AlphabetIndexerCursorAdapter(Bundle savedInstanceState, Context context, Cursor cursor) { super(savedInstanceState, context, R.layout.mca__simple_list_item_checkable_1, cursor, FROM, TO, 0); // Sets a new cursor as the data set and resets the cache of indices. int columnIndex = cursor.getColumnIndex(BuildingsContract.NAME); alphabetIndexer = new AlphabetIndexer(cursor, columnIndex, " ABCDEFGHIJKLMNOPQRTSUVWXYZ"); alphabetIndexer.setCursor(cursor); }
Example 5
Source File: AlphabetIndexerCursorAdapter.java From MultiChoiceAdapter with Apache License 2.0 | 5 votes |
public AlphabetIndexerCursorAdapter(Bundle savedInstanceState, Context context, Cursor cursor) { super(savedInstanceState, context, R.layout.mca__simple_list_item_checkable_1, cursor, FROM, TO, 0); // Sets a new cursor as the data set and resets the cache of indices. int columnIndex = cursor.getColumnIndex(BuildingsContract.NAME); alphabetIndexer = new AlphabetIndexer(cursor, columnIndex, " ABCDEFGHIJKLMNOPQRTSUVWXYZ"); alphabetIndexer.setCursor(cursor); }