diff options
| author | Ned Burns <pixel@google.com> | 2016-12-02 17:25:33 -0500 |
|---|---|---|
| committer | Ned Burns <pixel@google.com> | 2016-12-05 19:38:14 -0500 |
| commit | 7d6cb913de9b51dba0bae79e527b7d4fe79eb35d (patch) | |
| tree | a068b099cfc314538fe8a791379ed6ac2cf03f0c /core/java/android/view/Window.java | |
| parent | f7964be938338380654aaa41317b28335ed19084 (diff) | |
Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.
Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
Diffstat (limited to 'core/java/android/view/Window.java')
| -rw-r--r-- | core/java/android/view/Window.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 1cca0742877f..a36127db559f 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -581,8 +581,10 @@ public abstract class Window { * Called when a window is dismissed. This informs the callback that the * window is gone, and it should finish itself. * @param finishTask True if the task should also be finished. + * @param suppressWindowTransition True if the resulting exit and enter window transition + * animations should be suppressed. */ - void onWindowDismissed(boolean finishTask); + void onWindowDismissed(boolean finishTask, boolean suppressWindowTransition); } /** @hide */ @@ -871,9 +873,10 @@ public abstract class Window { } /** @hide */ - public final void dispatchOnWindowDismissed(boolean finishTask) { + public final void dispatchOnWindowDismissed( + boolean finishTask, boolean suppressWindowTransition) { if (mOnWindowDismissedCallback != null) { - mOnWindowDismissedCallback.onWindowDismissed(finishTask); + mOnWindowDismissedCallback.onWindowDismissed(finishTask, suppressWindowTransition); } } |
