summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewParent.java
diff options
context:
space:
mode:
authorOren Blasberg <orenb@google.com>2015-09-01 12:12:51 -0700
committerOren Blasberg <orenb@google.com>2015-09-25 12:01:01 -0700
commited3912692f0ba8a647d795462e20fcdb67adbacb (patch)
tree4302030bf6156e429b08e56c0514241a0697e604 /core/java/android/view/ViewParent.java
parentbf0282105a3b57bf32d6ffe60e8511ece9ce9e9b (diff)
Make context menus show as popup menus.
This means that right-clicking/long pressing on a view that is registered for context menu will show the context menu as a popup menu instead. Bug: 20016398 Change-Id: I96fea60435fff2f981d288521f490f8ff24ada15
Diffstat (limited to 'core/java/android/view/ViewParent.java')
-rw-r--r--core/java/android/view/ViewParent.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java
index 15b86d1245b2..07f1e2cbdb4f 100644
--- a/core/java/android/view/ViewParent.java
+++ b/core/java/android/view/ViewParent.java
@@ -182,6 +182,17 @@ public interface ViewParent {
public boolean showContextMenuForChild(View originalView);
/**
+ * Bring up a context menu for the specified view at the given x/y offset from
+ * the top left corner.
+ *
+ * @param originalView
+ * @param x The x offset at which to open the menu
+ * @param y The y offset at which to open the menu
+ * @return true if a context menu was displayed
+ */
+ public boolean showContextMenuForChild(View originalView, float x, float y);
+
+ /**
* Have the parent populate the specified context menu if it has anything to
* add (and then recurse on its parent).
*