summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSungmin Choi <sungmin.choi@lge.com>2013-01-25 21:39:01 +0900
committerSungmin Choi <sungmin.choi@lge.com>2013-01-25 22:06:55 +0900
commitf036920669f933c05ac43a8e0ea6cb1a4e35275a (patch)
tree33732c1735e0c61b3db4ad0d1b1d243f8140c2dd /core
parent381fb8bdd10e6426f829e90f57686103529adb77 (diff)
downloadframeworks_base-f036920669f933c05ac43a8e0ea6cb1a4e35275a.zip
frameworks_base-f036920669f933c05ac43a8e0ea6cb1a4e35275a.tar.gz
frameworks_base-f036920669f933c05ac43a8e0ea6cb1a4e35275a.tar.bz2
show SELECT ALL icon with text in landscape mode
Though set config_allowActionMenuItemTextWithIcon as true, icon for the "SELECT ALL" menu on ActionBar is not shown as staring in landscape mode. To fix it, use "SELECT ALL" icon in onCreateActionMode() to show the icon and text together. To show or hide text is decided by updateTextButtonVisibility() of core/java/com/android/internal/view/menu/ActionMenuItemView.java STEPS TO REPRODUCE: (please be specific) 1. launch Browser/Chrome and go to google.com 2. rotate to landscape mode 3. long press on URL address Bug: 8073761 Change-Id: Ie0e0aa45f0dff609ed8c03e4423b163bad5452ed
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/Editor.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index b1a44c5..4a7426b 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -2659,23 +2659,14 @@ public class Editor {
TypedArray styledAttributes = mTextView.getContext().obtainStyledAttributes(
com.android.internal.R.styleable.SelectionModeDrawables);
- boolean allowText = mTextView.getContext().getResources().getBoolean(
- com.android.internal.R.bool.config_allowActionMenuItemTextWithIcon);
-
mode.setTitle(mTextView.getContext().getString(
com.android.internal.R.string.textSelectionCABTitle));
mode.setSubtitle(null);
mode.setTitleOptionalHint(true);
- int selectAllIconId = 0; // No icon by default
- if (!allowText) {
- // Provide an icon, text will not be displayed on smaller screens.
- selectAllIconId = styledAttributes.getResourceId(
- R.styleable.SelectionModeDrawables_actionModeSelectAllDrawable, 0);
- }
-
menu.add(0, TextView.ID_SELECT_ALL, 0, com.android.internal.R.string.selectAll).
- setIcon(selectAllIconId).
+ setIcon(styledAttributes.getResourceId(
+ R.styleable.SelectionModeDrawables_actionModeSelectAllDrawable, 0)).
setAlphabeticShortcut('a').
setShowAsAction(
MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);