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

Commit 4c07c362 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "This adds copyAll to the edit contextMenu." into gingerbread

parents 51d94e9c fcf7f84e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -7469,6 +7469,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                menu.add(0, ID_SELECT_ALL, 0, com.android.internal.R.string.selectAll).
                     setOnMenuItemClickListener(handler).
                     setAlphabeticShortcut('a');
                menu.add(0, ID_COPY_ALL, 0, com.android.internal.R.string.copyAll).
                setOnMenuItemClickListener(handler).
                setAlphabeticShortcut('b');
                added = true;
            }

@@ -7535,6 +7538,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    private static final int ID_COPY_URL = android.R.id.copyUrl;
    private static final int ID_SWITCH_INPUT_METHOD = android.R.id.switchInputMethod;
    private static final int ID_ADD_TO_DICTIONARY = android.R.id.addToDictionary;
    private static final int ID_COPY_ALL = com.android.internal.R.id.copyAll;

    private class MenuHandler implements MenuItem.OnMenuItemClickListener {
        public boolean onMenuItemClick(MenuItem item) {
@@ -7624,6 +7628,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    getContext().startActivity(i);
                }
                return true;

            case ID_COPY_ALL:
                clip.setText(mText);
                return true;
            }

        return false;
+1 −0
Original line number Diff line number Diff line
@@ -68,4 +68,5 @@
  <item type="id" name="accountPreferences" />
  <item type="id" name="smallIcon" />
  <item type="id" name="custom" />
  <item type="id" name="copyAll" />
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1929,6 +1929,9 @@
    <!-- Item on EditText context menu. This action is used to select all text in the edit field. -->
    <string name="selectAll">Select all</string>

    <!-- Item on EditText context menu. This action is used to copy all text in the edit field. -->
    <string name="copyAll">Copy all</string>

    <!-- Item on EditText context menu. This action is used to start selecting text in the edit field. [CHAR LIMIT=20] -->
    <string name="selectText">Select word</string>