summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/ActionMenuView.java
diff options
context:
space:
mode:
authorChris Banes <chrisbanes@google.com>2015-06-11 08:05:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-11 08:05:42 +0000
commitdbdaa9b41e418437ec29f7ea2fa27b859b3bef14 (patch)
tree4b4aa67bc5ba72b1649cee56ec5f8cdfa2e4ef49 /core/java/android/widget/ActionMenuView.java
parent75a0ee081fa31b75649e164a8bf79a23a3ebd060 (diff)
parenta41b78973db3dfde159f7d641f794f462ad323d3 (diff)
downloadframeworks_base-dbdaa9b41e418437ec29f7ea2fa27b859b3bef14.zip
frameworks_base-dbdaa9b41e418437ec29f7ea2fa27b859b3bef14.tar.gz
frameworks_base-dbdaa9b41e418437ec29f7ea2fa27b859b3bef14.tar.bz2
Merge "API council review feedback for ActionMenuView" into mnc-dev
Diffstat (limited to 'core/java/android/widget/ActionMenuView.java')
-rw-r--r--core/java/android/widget/ActionMenuView.java50
1 files changed, 23 insertions, 27 deletions
diff --git a/core/java/android/widget/ActionMenuView.java b/core/java/android/widget/ActionMenuView.java
index 278a8fb..1f02c3b 100644
--- a/core/java/android/widget/ActionMenuView.java
+++ b/core/java/android/widget/ActionMenuView.java
@@ -16,11 +16,11 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.StyleRes;
import android.content.Context;
-import android.content.res.ColorStateList;
import android.content.res.Configuration;
-import android.graphics.PorterDuff;
+import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
@@ -541,39 +541,35 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
dismissPopupMenus();
}
- /** @hide */
- public boolean isOverflowReserved() {
- return mReserveOverflow;
- }
-
- /** @hide */
- public void setOverflowReserved(boolean reserveOverflow) {
- mReserveOverflow = reserveOverflow;
- }
-
/**
- * Applies a tint to the overflow drawable. Does not modify the current tint
- * mode, which is {@link PorterDuff.Mode#SRC_IN} by default.
+ * Set the icon to use for the overflow button.
*
- * @param tint the tint to apply, may be {@code null} to clear tint
+ * @param icon Drawable to set, may be null to clear the icon
*/
- public void setOverflowTintList(ColorStateList tint) {
- if (mPresenter != null) {
- mPresenter.setOverflowTintList(tint);
- }
+ public void setOverflowIcon(@Nullable Drawable icon) {
+ getMenu();
+ mPresenter.setOverflowIcon(icon);
}
/**
- * Specifies the blending mode used to apply the tint specified by {@link
- * #setOverflowTintList(ColorStateList)} to the overflow drawable.
- * The default mode is {@link PorterDuff.Mode#SRC_IN}.
+ * Return the current drawable used as the overflow icon.
*
- * @param tintMode the blending mode used to apply the tint, may be {@code null} to clear tint
+ * @return The overflow icon drawable
*/
- public void setOverflowTintMode(PorterDuff.Mode tintMode) {
- if (mPresenter != null) {
- mPresenter.setOverflowTintMode(tintMode);
- }
+ @Nullable
+ public Drawable getOverflowIcon() {
+ getMenu();
+ return mPresenter.getOverflowIcon();
+ }
+
+ /** @hide */
+ public boolean isOverflowReserved() {
+ return mReserveOverflow;
+ }
+
+ /** @hide */
+ public void setOverflowReserved(boolean reserveOverflow) {
+ mReserveOverflow = reserveOverflow;
}
@Override