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/app/Activity.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/app/Activity.java')
| -rw-r--r-- | core/java/android/app/Activity.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index e4880b0f6a43..e28e74335036 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -2946,8 +2946,11 @@ public class Activity extends ContextThemeWrapper * @hide */ @Override - public void onWindowDismissed(boolean finishTask) { + public void onWindowDismissed(boolean finishTask, boolean suppressWindowTransition) { finish(finishTask ? FINISH_TASK_WITH_ACTIVITY : DONT_FINISH_TASK_WITH_ACTIVITY); + if (suppressWindowTransition) { + overridePendingTransition(0, 0); + } } |
