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

Commit 2a5a5370 authored by Adam Powell's avatar Adam Powell
Browse files

Fix broken ActionMode close button styling

Change-Id: I425df1433d43c1b2bd392464ed10142532640f81
parent c7b29fbb
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -2187,6 +2187,17 @@
 visibility="public"
>
</field>
<field name="actionModeCloseButtonStyle"
 type="int"
 transient="false"
 volatile="false"
 value="16843576"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="actionModeCloseDrawable"
 type="int"
 transient="false"
@@ -3100,17 +3111,6 @@
 visibility="public"
>
</field>
<field name="closeButtonStyle"
 type="int"
 transient="false"
 volatile="false"
 value="16843576"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="codes"
 type="int"
 transient="false"
+2 −4
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ public class ActionBarContextView extends ViewGroup {
    private LinearLayout mTitleLayout;
    private TextView mTitleView;
    private TextView mSubtitleView;
    private int mCloseButtonStyle;
    private int mTitleStyleRes;
    private int mSubtitleStyleRes;
    private ActionMenuView mMenuView;
@@ -69,8 +68,6 @@ public class ActionBarContextView extends ViewGroup {
                com.android.internal.R.styleable.ActionMode_itemPadding, 0);
        setBackgroundDrawable(a.getDrawable(
                com.android.internal.R.styleable.ActionMode_background));
        mCloseButtonStyle = a.getResourceId(
                com.android.internal.R.styleable.ActionMode_closeButtonStyle, 0);
        mTitleStyleRes = a.getResourceId(
                com.android.internal.R.styleable.ActionMode_titleTextStyle, 0);
        mSubtitleStyleRes = a.getResourceId(
@@ -156,7 +153,8 @@ public class ActionBarContextView extends ViewGroup {

    public void initForMode(final ActionMode mode) {
        if (mCloseButton == null) {
            mCloseButton = new ImageButton(getContext(), null, mCloseButtonStyle);
            mCloseButton = new ImageButton(getContext(), null,
                    com.android.internal.R.attr.actionModeCloseButtonStyle);
        }
        mCloseButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
+2 −3
Original line number Diff line number Diff line
@@ -469,7 +469,6 @@
        <attr name="actionBarTabBarStyle" format="reference" />
        <attr name="actionBarTabTextStyle" format="reference" />
        <attr name="actionOverflowButtonStyle" format="reference" />
        <attr name="actionModeStyle" format="reference" />
        <!-- Reference to a style for the Action Bar -->
        <attr name="actionBarStyle" format="reference" />
        <!-- Size of the Action Bar, including the contextual
@@ -483,6 +482,8 @@
        <!-- Action mode styles  -->
        <!-- =================== -->
        <eat-comment />
        <attr name="actionModeStyle" format="reference" />
        <attr name="actionModeCloseButtonStyle" format="reference" />
        <!-- Background drawable to use for action mode UI -->
        <attr name="actionModeBackground" format="reference" />
        <!-- Drawable to use for the close action mode button -->
@@ -4090,8 +4091,6 @@
        <attr name="height" />
        <!-- Specifies a padding to use between elements on the bar. -->
        <attr name="itemPadding" format="dimension" />
        <!-- Specifies a style for the mode's close button. -->
        <attr name="closeButtonStyle" format="reference" />
    </declare-styleable>

    <declare-styleable name="SearchView">
+1 −1
Original line number Diff line number Diff line
@@ -1340,7 +1340,7 @@
  <public type="attr" name="actionBarTabTextStyle" />
  <public type="attr" name="actionOverflowButtonStyle" />
  <public type="attr" name="itemPadding" />
  <public type="attr" name="closeButtonStyle" />
  <public type="attr" name="actionModeCloseButtonStyle" />
  <public type="attr" name="titleTextStyle" />
  <public type="attr" name="subtitleTextStyle" />
  <public type="attr" name="iconifiedByDefault" />
+0 −1
Original line number Diff line number Diff line
@@ -890,7 +890,6 @@
        <item name="android:background">?android:attr/actionModeBackground</item>
        <item name="android:height">?android:attr/actionBarSize</item>
        <item name="android:itemPadding">?android:attr/actionButtonPadding</item>
        <item name="android:closeButtonStyle">@android:style/Widget.ActionButton.CloseMode</item>
        <item name="android:titleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Title</item>
        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Subtitle</item>
    </style>
Loading