Java Code Examples for android.view.Window#FEATURE_CONTEXT_MENU
The following examples show how to use
android.view.Window#FEATURE_CONTEXT_MENU .
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: Commander.java From microMathematics with GNU General Public License v3.0 | 6 votes |
@Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (featureId != Window.FEATURE_CONTEXT_MENU) { return false; } try { AdapterView.AdapterContextMenuInfo info; info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); if (info == null) return false; fileListView.setSelection(info.position, 0); dispatchCommand(item.getItemId()); return true; } catch (Exception e) { e.printStackTrace(); return false; } }
Example 2
Source File: FragmentActivity.java From CodenameOne with GNU General Public License v2.0 | 6 votes |
/** * Dispatch context and options menu to fragments. */ @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (super.onMenuItemSelected(featureId, item)) { return true; } switch (featureId) { case Window.FEATURE_OPTIONS_PANEL: return mFragments.dispatchOptionsItemSelected(item); case Window.FEATURE_CONTEXT_MENU: return mFragments.dispatchContextItemSelected(item); default: return false; } }
Example 3
Source File: FragmentActivity.java From adt-leanback-support with Apache License 2.0 | 6 votes |
/** * Dispatch context and options menu to fragments. */ @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (super.onMenuItemSelected(featureId, item)) { return true; } switch (featureId) { case Window.FEATURE_OPTIONS_PANEL: return mFragments.dispatchOptionsItemSelected(item); case Window.FEATURE_CONTEXT_MENU: return mFragments.dispatchContextItemSelected(item); default: return false; } }
Example 4
Source File: FragmentActivity.java From android-recipes-app with Apache License 2.0 | 6 votes |
/** * Dispatch context and options menu to fragments. */ @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (super.onMenuItemSelected(featureId, item)) { return true; } switch (featureId) { case Window.FEATURE_OPTIONS_PANEL: return mFragments.dispatchOptionsItemSelected(item); case Window.FEATURE_CONTEXT_MENU: return mFragments.dispatchContextItemSelected(item); default: return false; } }
Example 5
Source File: FragmentActivity.java From V.FlyoutTest with MIT License | 6 votes |
/** * Dispatch context and options menu to fragments. */ @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (super.onMenuItemSelected(featureId, item)) { return true; } switch (featureId) { case Window.FEATURE_OPTIONS_PANEL: return mFragments.dispatchOptionsItemSelected(item); case Window.FEATURE_CONTEXT_MENU: return mFragments.dispatchContextItemSelected(item); default: return false; } }
Example 6
Source File: FragmentActivity.java From guideshow with MIT License | 6 votes |
/** * Dispatch context and options menu to fragments. */ @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { if (super.onMenuItemSelected(featureId, item)) { return true; } switch (featureId) { case Window.FEATURE_OPTIONS_PANEL: return mFragments.dispatchOptionsItemSelected(item); case Window.FEATURE_CONTEXT_MENU: return mFragments.dispatchContextItemSelected(item); default: return false; } }