List of usage examples for android.app SearchManager SUGGEST_COLUMN_FLAGS
String SUGGEST_COLUMN_FLAGS
To view the source code for android.app SearchManager SUGGEST_COLUMN_FLAGS.
Click Source Link
From source file:com.aboveware.sms.contacts.ContactSuggestionsAdapter.java
/** * Cache columns.//from w ww . j a va2 s. com */ @SuppressLint("InlinedApi") @Override public void changeCursor(Cursor c) { if (DBG) Log.d(LOG_TAG, "changeCursor(" + c + ")"); if (mClosed) { Log.w(LOG_TAG, "Tried to change cursor after adapter was closed."); if (c != null) c.close(); return; } try { super.changeCursor(c); if (c != null) { mText1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1); mText2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2); mText2UrlCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2_URL); c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_1); mIconName2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_2); mFlagsCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_FLAGS); } } catch (Exception e) { Log.e(LOG_TAG, "error changing cursor and caching columns", e); } }
From source file:android.support.v7.widget.SuggestionsAdapter.java
/** * Cache columns./*from w w w . j a v a 2s . c o m*/ */ @Override public void changeCursor(Cursor c) { if (DBG) Log.d(LOG_TAG, "changeCursor(" + c + ")"); if (mClosed) { Log.w(LOG_TAG, "Tried to change cursor after adapter was closed."); if (c != null) c.close(); return; } try { super.changeCursor(c); if (c != null) { mText1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1); mText2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2); mText2UrlCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2_URL); mIconName1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_1); mIconName2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_2); mFlagsCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_FLAGS); } } catch (Exception e) { Log.e(LOG_TAG, "error changing cursor and caching columns", e); } }