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

Commit 78996c93 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Changed Cut/Copy/Paste assets.

New assets, in dark/light version.

Made public attributes of the Theme, so that they can be customized.

Select_all was not included in that change. It is supposed to be represented
as text instead of an icon. Waiting for a CL that enables this feature.

Change-Id: Icc912b2eb582295c60c0a409760d2c3d65989fc6
parent 4388ecbf
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -2231,6 +2231,39 @@
 visibility="public"
>
</field>
<field name="actionModeCopyDrawable"
 type="int"
 transient="false"
 volatile="false"
 value="16843601"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="actionModeCutDrawable"
 type="int"
 transient="false"
 volatile="false"
 value="16843600"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="actionModePasteDrawable"
 type="int"
 transient="false"
 volatile="false"
 value="16843602"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="actionOverflowButtonStyle"
 type="int"
 transient="false"
+8 −3
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.internal.widget.EditableInputConnection;

import org.xmlpull.v1.XmlPullParserException;

import android.R;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
@@ -7695,6 +7696,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                return false;
            }

            TypedArray styledAttributes = mContext.obtainStyledAttributes(R.styleable.Theme);

            mode.setTitle(mContext.getString(com.android.internal.R.string.textSelectionCABTitle));
            mode.setSubtitle(null);

@@ -7711,25 +7714,27 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

            if (canCut()) {
                menu.add(0, ID_CUT, 0, com.android.internal.R.string.cut).
                    setIcon(com.android.internal.R.drawable.ic_menu_cut).
                    setIcon(styledAttributes.getResourceId(R.styleable.Theme_actionModeCutDrawable, 0)).
                    setAlphabeticShortcut('x');
                atLeastOne = true;
            }

            if (canCopy()) {
                menu.add(0, ID_COPY, 0, com.android.internal.R.string.copy).
                    setIcon(com.android.internal.R.drawable.ic_menu_copy).
                    setIcon(styledAttributes.getResourceId(R.styleable.Theme_actionModeCopyDrawable, 0)).
                    setAlphabeticShortcut('c');
                atLeastOne = true;
            }

            if (canPaste()) {
                menu.add(0, ID_PASTE, 0, com.android.internal.R.string.paste).
                        setIcon(com.android.internal.R.drawable.ic_menu_paste).
                        setIcon(styledAttributes.getResourceId(R.styleable.Theme_actionModePasteDrawable, 0)).
                        setAlphabeticShortcut('v');
                atLeastOne = true;
            }

            styledAttributes.recycle();

            if (atLeastOne) {
                mSelectionModifierCursorController.show();
                return true;
−3.55 KiB
Loading image diff...
−2.92 KiB
Loading image diff...
−2.67 KiB
Loading image diff...
Loading