Loading core/java/android/widget/TextView.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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) { Loading Loading @@ -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; Loading core/res/res/values/ids.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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> core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading
core/java/android/widget/TextView.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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) { Loading Loading @@ -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; Loading
core/res/res/values/ids.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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>
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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> Loading