Java Code Examples for android.view.ActionMode#TYPE_PRIMARY
The following examples show how to use
android.view.ActionMode#TYPE_PRIMARY .
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: Dialog.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public ActionMode onWindowStartingActionMode(ActionMode.Callback callback) { if (mActionBar != null && mActionModeTypeStarting == ActionMode.TYPE_PRIMARY) { return mActionBar.startActionMode(callback); } return null; }
Example 2
Source File: Dialog.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public ActionMode onWindowStartingActionMode(ActionMode.Callback callback, int type) { try { mActionModeTypeStarting = type; return onWindowStartingActionMode(callback); } finally { mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; } }
Example 3
Source File: SearchDialog.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public ActionMode startActionModeForChild( View child, ActionMode.Callback callback, int type) { // Disable Primary Action Modes in the SearchBar, as they overlap. if (type != ActionMode.TYPE_PRIMARY) { return super.startActionModeForChild(child, callback, type); } return null; }