private boolean initializePanelMenu() { Context context = mActivity;//getContext(); // If we have an action bar, initialize the menu with a context themed for it. if (wActionBar != null) { TypedValue outValue = new TypedValue(); Resources.Theme currentTheme = context.getTheme(); currentTheme.resolveAttribute(R.attr.actionBarWidgetTheme, outValue, true); final int targetThemeRes = outValue.resourceId; if (targetThemeRes != 0 /*&& context.getThemeResId() != targetThemeRes*/) { context = new ContextThemeWrapper(context, targetThemeRes); } } mMenu = new MenuBuilder(context); mMenu.setCallback(this); return true; }
private boolean initializePanelMenu() { Context context = mActivity;//getContext(); // If we have an action bar, initialize the menu with a context themed for it. if (wActionBar != null) { TypedValue outValue = new TypedValue(); Resources.Theme currentTheme = context.getTheme(); currentTheme.resolveAttribute(R.attr.actionBarWidgetTheme, outValue, true); final int targetThemeRes = outValue.resourceId; if (targetThemeRes != 0 /*&& context.getThemeResId() != targetThemeRes*/) { context = new ContextThemeWrapper(context, targetThemeRes); } } mMenu = new MenuBuilder(context); mMenu.setCallback(this); return true; }
public StandaloneActionMode(Context context, ActionBarContextView view, ActionMode.Callback callback, boolean isFocusable) { mContext = context; mContextView = view; mCallback = callback; mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); mFocusable = isFocusable; }
public StandaloneActionMode(Context context, ActionBarContextView view, ActionMode.Callback callback, boolean isFocusable) { mContext = context; mContextView = view; mCallback = callback; mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); mFocusable = isFocusable; }
public ActionModeImpl(ActionMode.Callback callback) { mCallback = callback; mMenu = new MenuBuilder(getThemedContext()) .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); }
public ActionModeImpl(ActionMode.Callback callback) { mCallback = callback; mMenu = new MenuBuilder(getThemedContext()) .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); }