Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6a36e9c authored by Alan Viverette's avatar Alan Viverette
Browse files

Inflate ActionMode items against the ActionBarContextView theme

BUG: 18078900
Change-Id: I300a0268bacf7e1ebcd64eac3d79548e1c4a9606
parent 52f811ec
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -496,7 +496,7 @@ public class WindowDecorActionBar extends ActionBar implements


        mOverlayLayout.setHideOnContentScrollEnabled(false);
        mOverlayLayout.setHideOnContentScrollEnabled(false);
        mContextView.killMode();
        mContextView.killMode();
        ActionModeImpl mode = new ActionModeImpl(callback);
        ActionModeImpl mode = new ActionModeImpl(mContextView.getContext(), callback);
        if (mode.dispatchOnCreate()) {
        if (mode.dispatchOnCreate()) {
            mode.invalidate();
            mode.invalidate();
            mContextView.initForMode(mode);
            mContextView.initForMode(mode);
@@ -940,9 +940,9 @@ public class WindowDecorActionBar extends ActionBar implements
        private MenuBuilder mMenu;
        private MenuBuilder mMenu;
        private WeakReference<View> mCustomView;
        private WeakReference<View> mCustomView;
        
        
        public ActionModeImpl(ActionMode.Callback callback) {
        public ActionModeImpl(Context context, ActionMode.Callback callback) {
            mCallback = callback;
            mCallback = callback;
            mMenu = new MenuBuilder(getThemedContext())
            mMenu = new MenuBuilder(context)
                    .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
                    .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
            mMenu.setCallback(this);
            mMenu.setCallback(this);
        }
        }
+1 −1
Original line number Original line Diff line number Diff line
@@ -241,7 +241,7 @@ public class ActionBarContextView extends AbsActionBarView implements AnimatorLi
        if (!mSplitActionBar) {
        if (!mSplitActionBar) {
            menu.addMenuPresenter(mActionMenuPresenter, mPopupContext);
            menu.addMenuPresenter(mActionMenuPresenter, mPopupContext);
            mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
            mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
            mMenuView.setBackgroundDrawable(null);
            mMenuView.setBackground(null);
            addView(mMenuView, layoutParams);
            addView(mMenuView, layoutParams);
        } else {
        } else {
            // Allow full screen width in split mode.
            // Allow full screen width in split mode.