diff options
| author | Chris Banes <chrisbanes@google.com> | 2015-06-09 13:36:44 +0000 |
|---|---|---|
| committer | Chris Banes <chrisbanes@google.com> | 2015-06-10 11:39:01 +0100 |
| commit | a41b78973db3dfde159f7d641f794f462ad323d3 (patch) | |
| tree | 98701587be8e486b93ad9f8fa75ec82c50f71009 /core/java/android/view | |
| parent | d9b0acd2eb8d844b9f901fc62e0de74c1a7d8430 (diff) | |
| download | frameworks_base-a41b78973db3dfde159f7d641f794f462ad323d3.zip frameworks_base-a41b78973db3dfde159f7d641f794f462ad323d3.tar.gz frameworks_base-a41b78973db3dfde159f7d641f794f462ad323d3.tar.bz2 | |
API council review feedback for ActionMenuView
Reverts "MenuItem, navigation and overflow icon tinting" CL,
and adds getter and setter for the overflow icon to ActionMenuView
and Toolbar.
BUG: 21571899
Change-Id: I591f43650356443fa3256e4d74e28b6ddd8c2b33
Diffstat (limited to 'core/java/android/view')
| -rw-r--r-- | core/java/android/view/MenuInflater.java | 32 | ||||
| -rw-r--r-- | core/java/android/view/MenuItem.java | 24 |
2 files changed, 0 insertions, 56 deletions
diff --git a/core/java/android/view/MenuInflater.java b/core/java/android/view/MenuInflater.java index dc8cadf..1c67ba7 100644 --- a/core/java/android/view/MenuInflater.java +++ b/core/java/android/view/MenuInflater.java @@ -25,11 +25,8 @@ import android.annotation.MenuRes; import android.app.Activity; import android.content.Context; import android.content.ContextWrapper; -import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; -import android.graphics.PorterDuff; -import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.Log; import android.util.Xml; @@ -337,11 +334,6 @@ public class MenuInflater { private ActionProvider itemActionProvider; - private ColorStateList itemIconTintList; - private boolean itemIconTintListSet; - private PorterDuff.Mode itemIconTintMode; - private boolean itemIconTintModeSet; - private static final int defaultGroupId = NO_ID; private static final int defaultItemId = NO_ID; private static final int defaultItemCategory = 0; @@ -432,23 +424,6 @@ public class MenuInflater { itemActionProvider = null; } - if (a.hasValueOrEmpty(com.android.internal.R.styleable.MenuItem_iconTint)) { - itemIconTintList = a.getColorStateList( - com.android.internal.R.styleable.MenuItem_iconTint); - itemIconTintListSet = true; - } else { - itemIconTintList = null; - itemIconTintListSet = false; - } - if (a.hasValueOrEmpty(com.android.internal.R.styleable.MenuItem_iconTintMode)) { - itemIconTintMode = Drawable.parseTintMode( - a.getInt(com.android.internal.R.styleable.MenuItem_iconTintMode, -1), null); - itemIconTintModeSet = true; - } else { - itemIconTintMode = null; - itemIconTintModeSet = false; - } - a.recycle(); itemAdded = false; @@ -511,13 +486,6 @@ public class MenuInflater { if (itemActionProvider != null) { item.setActionProvider(itemActionProvider); } - - if (itemIconTintListSet) { - item.setIconTintList(itemIconTintList); - } - if (itemIconTintModeSet) { - item.setIconTintMode(itemIconTintMode); - } } public MenuItem addItem() { diff --git a/core/java/android/view/MenuItem.java b/core/java/android/view/MenuItem.java index 2948007..9e8b97e 100644 --- a/core/java/android/view/MenuItem.java +++ b/core/java/android/view/MenuItem.java @@ -21,8 +21,6 @@ import android.annotation.LayoutRes; import android.annotation.StringRes; import android.app.Activity; import android.content.Intent; -import android.content.res.ColorStateList; -import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.view.ContextMenu.ContextMenuInfo; import android.view.View.OnCreateContextMenuListener; @@ -601,26 +599,4 @@ public interface MenuItem { * @return This menu item instance for call chaining */ public MenuItem setOnActionExpandListener(OnActionExpandListener listener); - - /** - * Applies a tint to the icon drawable. Does not modify the current tint - * mode, which is {@link PorterDuff.Mode#SRC_IN} by default. - * <p> - * Subsequent calls to {@link android.view.MenuItem#setIcon(android.graphics.drawable.Drawable)} - * will automatically mutate the drawable and apply the specified tint and tint mode. - * - * @param tint the tint to apply, may be {@code null} to clear tint - * @return This menu item instance for call chaining - */ - public MenuItem setIconTintList(ColorStateList tint); - - /** - * Specifies the blending mode used to apply the tint specified by {@link - * #setIconTintList(ColorStateList)} to the icon drawable. The default mode is {@link - * PorterDuff.Mode#SRC_IN}. - * - * @param tintMode the blending mode used to apply the tint, may be {@code null} to clear tint - * @return This menu item instance for call chaining - */ - public MenuItem setIconTintMode(PorterDuff.Mode tintMode); } |
