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

Commit 07ecc748 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Use action bar theme for action modes, fix ViewStub inflation theme" into lmp-dev

parents 3c7f018f a9ddb8dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -606,9 +606,9 @@ public abstract class LayoutInflater {
            constructor.setAccessible(true);
            final View view = constructor.newInstance(args);
            if (view instanceof ViewStub) {
                // always use ourselves when inflating ViewStub later
                // Use the same context when inflating ViewStub later.
                final ViewStub viewStub = (ViewStub) view;
                viewStub.setLayoutInflater(this);
                viewStub.setLayoutInflater(cloneInContext((Context) args[0]));
            }
            return view;

+4 −3
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
        mContextView = view;
        mCallback = callback;

        mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
        mMenu = new MenuBuilder(view.getContext()).setDefaultShowAsAction(
                MenuItem.SHOW_AS_ACTION_IF_ROOM);
        mMenu.setCallback(this);
        mFocusable = isFocusable;
    }
@@ -126,7 +127,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call

    @Override
    public MenuInflater getMenuInflater() {
        return new MenuInflater(mContext);
        return new MenuInflater(mContextView.getContext());
    }

    public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
@@ -141,7 +142,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
            return true;
        }

        new MenuPopupHelper(mContext, subMenu).show();
        new MenuPopupHelper(mContextView.getContext(), subMenu).show();
        return true;
    }

+2 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ This is the basic layout for a screen, with all of its features enabled.
              android:inflatedId="@+id/action_mode_bar"
              android:layout="@layout/action_mode_bar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" />
              android:layout_height="wrap_content"
              android:theme="?attr/actionBarTheme" />

    <!-- Title bar -->
    <RelativeLayout android:id="@android:id/title_container"
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@ This is a custom layout for a screen.
              android:inflatedId="@+id/action_mode_bar"
              android:layout="@layout/action_mode_bar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" />
              android:layout_height="wrap_content"
              android:theme="?attr/actionBarTheme" />

    <FrameLayout android:id="@android:id/title_container" 
        android:layout_width="match_parent" 
+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ This is the basic layout for a screen, with all of its features enabled.
              android:inflatedId="@+id/action_mode_bar"
              android:layout="@layout/action_mode_bar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" />
              android:layout_height="wrap_content"
              android:theme="?attr/actionBarTheme" />

    <RelativeLayout android:id="@android:id/title_container" 
        style="?android:attr/windowTitleBackgroundStyle"
Loading