List of usage examples for android.app SearchManager ACTION_KEY
String ACTION_KEY
To view the source code for android.app SearchManager ACTION_KEY.
Click Source Link
From source file:android.support.v7.widget.SearchView.java
/** * Constructs an intent from the given information and the search dialog state. * * @param action Intent action./*from ww w.ja v a2s .co m*/ * @param data Intent data, or <code>null</code>. * @param extraData Data for {@link SearchManager#EXTRA_DATA_KEY} or <code>null</code>. * @param query Intent query, or <code>null</code>. * @param actionKey The key code of the action key that was pressed, * or {@link KeyEvent#KEYCODE_UNKNOWN} if none. * @param actionMsg The message for the action key that was pressed, * or <code>null</code> if none. * @return The intent. */ private Intent createIntent(String action, Uri data, String extraData, String query, int actionKey, String actionMsg) { // Now build the Intent Intent intent = new Intent(action); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // We need CLEAR_TOP to avoid reusing an old task that has other activities // on top of the one we want. We don't want to do this in in-app search though, // as it can be destructive to the activity stack. if (data != null) { intent.setData(data); } intent.putExtra(SearchManager.USER_QUERY, mUserQuery); if (query != null) { intent.putExtra(SearchManager.QUERY, query); } if (extraData != null) { intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData); } if (mAppSearchData != null) { intent.putExtra(SearchManager.APP_DATA, mAppSearchData); } if (actionKey != KeyEvent.KEYCODE_UNKNOWN) { intent.putExtra(SearchManager.ACTION_KEY, actionKey); intent.putExtra(SearchManager.ACTION_MSG, actionMsg); } if (IS_AT_LEAST_FROYO) { intent.setComponent(mSearchable.getSearchActivity()); } return intent; }
From source file:cm.aptoide.com.actionbarsherlock.widget.SearchView.java
/** * Constructs an intent from the given information and the search dialog state. * * @param action Intent action.// www.ja v a2 s. c o m * @param data Intent data, or <code>null</code>. * @param extraData Data for {@link SearchManager#EXTRA_DATA_KEY} or <code>null</code>. * @param query Intent query, or <code>null</code>. * @param actionKey The key code of the action key that was pressed, * or {@link KeyEvent#KEYCODE_UNKNOWN} if none. * @param actionMsg The message for the action key that was pressed, * or <code>null</code> if none. * @return The intent. */ private Intent createIntent(String action, Uri data, String extraData, String query, int actionKey, String actionMsg) { // Now build the Intent Intent intent = new Intent(action); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // We need CLEAR_TOP to avoid reusing an old task that has other activities // on top of the one we want. We don't want to do this in in-app search though, // as it can be destructive to the activity stack. if (data != null) { intent.setData(data); } intent.putExtra(SearchManager.USER_QUERY, mUserQuery); if (query != null) { intent.putExtra(SearchManager.QUERY, query); } if (extraData != null) { intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData); } if (mAppSearchData != null) { intent.putExtra(SearchManager.APP_DATA, mAppSearchData); } if (actionKey != KeyEvent.KEYCODE_UNKNOWN) { intent.putExtra(SearchManager.ACTION_KEY, actionKey); intent.putExtra(SearchManager.ACTION_MSG, actionMsg); } intent.setComponent(mSearchable.getSearchActivity()); return intent; }
From source file:com.example.navigationsearchview.NavigationSearchView.java
/** * Constructs an intent from the given information and the search dialog * state.// ww w . j av a 2 s . c om * * @param action * Intent action. * @param data * Intent data, or <code>null</code>. * @param extraData * Data for {@link SearchManager#EXTRA_DATA_KEY} or * <code>null</code>. * @param query * Intent query, or <code>null</code>. * @param actionKey * The key code of the action key that was pressed, or * {@link KeyEvent#KEYCODE_UNKNOWN} if none. * @param actionMsg * The message for the action key that was pressed, or * <code>null</code> if none. * @return The intent. */ private Intent createIntent(String action, Uri data, String extraData, String query, int actionKey, String actionMsg) { // Now build the Intent Intent intent = new Intent(action); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // We need CLEAR_TOP to avoid reusing an old task that has other // activities // on top of the one we want. We don't want to do this in in-app search // though, // as it can be destructive to the activity stack. if (data != null) { intent.setData(data); } intent.putExtra(SearchManager.USER_QUERY, mUserQuery); if (query != null) { intent.putExtra(SearchManager.QUERY, query); } if (extraData != null) { intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData); } if (mAppSearchData != null) { intent.putExtra(SearchManager.APP_DATA, mAppSearchData); } if (actionKey != KeyEvent.KEYCODE_UNKNOWN) { intent.putExtra(SearchManager.ACTION_KEY, actionKey); intent.putExtra(SearchManager.ACTION_MSG, actionMsg); } if (IS_AT_LEAST_FROYO) { intent.setComponent(mSearchable.getSearchActivity()); } return intent; }
From source file:com.tandong.sa.sherlock.widget.SearchView.java
/** * Constructs an intent from the given information and the search dialog * state./*from ww w . ja v a2 s. c o m*/ * * @param action * Intent action. * @param data * Intent data, or <code>null</code>. * @param extraData * Data for {@link SearchManager#EXTRA_DATA_KEY} or * <code>null</code>. * @param query * Intent query, or <code>null</code>. * @param actionKey * The key code of the action key that was pressed, or * {@link KeyEvent#KEYCODE_UNKNOWN} if none. * @param actionMsg * The message for the action key that was pressed, or * <code>null</code> if none. * @return The intent. */ private Intent createIntent(String action, Uri data, String extraData, String query, int actionKey, String actionMsg) { // Now build the Intent Intent intent = new Intent(action); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // We need CLEAR_TOP to avoid reusing an old task that has other // activities // on top of the one we want. We don't want to do this in in-app search // though, // as it can be destructive to the activity stack. if (data != null) { intent.setData(data); } intent.putExtra(SearchManager.USER_QUERY, mUserQuery); if (query != null) { intent.putExtra(SearchManager.QUERY, query); } if (extraData != null) { intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData); } if (mAppSearchData != null) { intent.putExtra(SearchManager.APP_DATA, mAppSearchData); } if (actionKey != KeyEvent.KEYCODE_UNKNOWN) { intent.putExtra(SearchManager.ACTION_KEY, actionKey); intent.putExtra(SearchManager.ACTION_MSG, actionMsg); } intent.setComponent(mSearchable.getSearchActivity()); return intent; }