List of usage examples for android.app SearchManager SUGGEST_COLUMN_ICON_2
String SUGGEST_COLUMN_ICON_2
To view the source code for android.app SearchManager SUGGEST_COLUMN_ICON_2.
Click Source Link
From source file:com.google.android.demos.jamendo.widget.SearchAdapter.java
@Override public void bindView(View view, Context context, Cursor cursor) { bindTextView(view, cursor, R.id.text1, SearchManager.SUGGEST_COLUMN_TEXT_1); bindTextView(view, cursor, R.id.text2, SearchManager.SUGGEST_COLUMN_TEXT_2); bindImageView(view, cursor, R.id.icon, SearchManager.SUGGEST_COLUMN_ICON_2); }
From source file:com.google.android.demos.jamendo.app.SearchActivity.java
/** {@inheritDoc} */ public Loader<Cursor> onCreateLoader(int id, Bundle args) { Intent intent = getIntent();/*www. jav a 2 s . c o m*/ String query = intent.getStringExtra(SearchManager.QUERY); Uri.Builder builder = JamendoContract.AUTHORITY_URI.buildUpon(); builder.appendPath(SearchManager.SUGGEST_URI_PATH_QUERY); builder.appendPath(query); Uri uri = builder.build(); String[] projection = { BaseColumns._ID, SearchManager.SUGGEST_COLUMN_ICON_2, SearchManager.SUGGEST_COLUMN_TEXT_1, SearchManager.SUGGEST_COLUMN_TEXT_2 }; String selection = JamendoContract.PARAM_IMAGE_SIZE + "=" + mImageSize; String[] selectionArgs = null; String sortOrder = null; return new CursorLoader(this, uri, projection, selection, selectionArgs, sortOrder); }
From source file:com.aboveware.sms.contacts.ContactSuggestionsAdapter.java
/** * Cache columns.//from w ww . ja v a 2 s.c o m */ @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 . ja v a 2 s . c om */ @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); } }