diff options
| author | Jeff Brown <jeffbrown@google.com> | 2010-09-27 14:40:38 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-27 14:40:38 -0700 |
| commit | 464fb74e28b6d76d5e741abcdbb714eea2d9b4d1 (patch) | |
| tree | 806828fef18870b8c0a5cde7a6e679dce8b5a122 /core/java/android/widget/PopupWindow.java | |
| parent | 6d3ed72bf2fb9d958245c9d34443291a26128c59 (diff) | |
| parent | 9785bf0f2b6b8758aed7ded3b996a2ef0be89919 (diff) | |
am 9785bf0f: am 14a288da: Merge "Add suuport for splitting touch events across windows." into gingerbread
Merge commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919'
* commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919':
Add suuport for splitting touch events across windows.
Diffstat (limited to 'core/java/android/widget/PopupWindow.java')
| -rw-r--r-- | core/java/android/widget/PopupWindow.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java index 71f4f03f88d3..1bc061208fa8 100644 --- a/core/java/android/widget/PopupWindow.java +++ b/core/java/android/widget/PopupWindow.java @@ -87,6 +87,7 @@ public class PopupWindow { private boolean mTouchable = true; private boolean mOutsideTouchable = false; private boolean mClippingEnabled = true; + private boolean mSplitTouchEnabled; private OnTouchListener mTouchInterceptor; @@ -576,6 +577,36 @@ public class PopupWindow { } /** + * <p>Indicates whether the popup window supports splitting touches.</p> + * + * @return true if the touch splitting is enabled, false otherwise + * + * @see #setSplitTouchEnabled(boolean) + * @hide + */ + public boolean isSplitTouchEnabled() { + return mSplitTouchEnabled; + } + + /** + * <p>Allows the popup window to split touches across other windows that also + * support split touch. When this flag is not set, the first pointer + * that goes down determines the window to which all subsequent touches + * go until all pointers go up. When this flag is set, each pointer + * (not necessarily the first) that goes down determines the window + * to which all subsequent touches of that pointer will go until that + * pointer goes up thereby enabling touches with multiple pointers + * to be split across multiple windows.</p> + * + * @param enabled true if the split touches should be enabled, false otherwise + * @see #isSplitTouchEnabled() + * @hide + */ + public void setSplitTouchEnabled(boolean enabled) { + mSplitTouchEnabled = enabled; + } + + /** * <p>Change the width and height measure specs that are given to the * window manager by the popup. By default these are 0, meaning that * the current width or height is requested as an explicit size from @@ -900,6 +931,9 @@ public class PopupWindow { if (!mClippingEnabled) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; } + if (mSplitTouchEnabled) { + curFlags |= WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; + } return curFlags; } |
