diff options
| author | Will Haldean Brown <haldean@google.com> | 2014-02-12 10:23:41 -0800 |
|---|---|---|
| committer | Will Haldean Brown <haldean@google.com> | 2014-03-04 09:26:15 -0800 |
| commit | ca6234e084a71e0c968cff404620298bcd971fcc (patch) | |
| tree | bd5c5a5ba959637f34af9d70e97b5b60def2eb70 /core/java/android/app/Dialog.java | |
| parent | a4bd2cbe509911729c9f185b045e54d7528d8836 (diff) | |
Add swipe-to-dismiss support to PhoneWindow.
This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow registers
handlers that listen for these swipe events, translate the window when
necessary, and finish the activity at the end of the gesture.
Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
Diffstat (limited to 'core/java/android/app/Dialog.java')
| -rw-r--r-- | core/java/android/app/Dialog.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index cda2c5f3b7c5..a8277b5e7018 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -695,6 +695,10 @@ public class Dialog implements DialogInterface, Window.Callback, public void onDetachedFromWindow() { } + + public void onWindowDismissed() { + dismiss(); + } /** * Called to process key events. You can override this to intercept all |
