From 6ea3b116fc2eea7cc1a6892c548da45a4f581a1d Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Wed, 11 Jun 2014 11:38:49 -0700 Subject: [PATCH] Override app launch transition for LMP preview issue 15544569 j) Change-Id: I8aff85a154cb98d865a8834f37b13e30cd03de6c --- res/anim/no_anim.xml | 18 +++++++++++++ res/anim/task_open_enter.xml | 34 +++++++++++++++++++++++++ res/interpolator/decelerate_quart.xml | 21 +++++++++++++++ res/interpolator/decelerate_quint.xml | 21 +++++++++++++++ src/com/android/launcher3/Launcher.java | 4 +++ 5 files changed, 98 insertions(+) create mode 100644 res/anim/no_anim.xml create mode 100644 res/anim/task_open_enter.xml create mode 100644 res/interpolator/decelerate_quart.xml create mode 100644 res/interpolator/decelerate_quint.xml diff --git a/res/anim/no_anim.xml b/res/anim/no_anim.xml new file mode 100644 index 0000000000..02b162519a --- /dev/null +++ b/res/anim/no_anim.xml @@ -0,0 +1,18 @@ + + + + diff --git a/res/anim/task_open_enter.xml b/res/anim/task_open_enter.xml new file mode 100644 index 0000000000..b2aadd7fa7 --- /dev/null +++ b/res/anim/task_open_enter.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/res/interpolator/decelerate_quart.xml b/res/interpolator/decelerate_quart.xml new file mode 100644 index 0000000000..5dc5d38576 --- /dev/null +++ b/res/interpolator/decelerate_quart.xml @@ -0,0 +1,21 @@ + + + + diff --git a/res/interpolator/decelerate_quint.xml b/res/interpolator/decelerate_quint.xml new file mode 100644 index 0000000000..fa89a648e3 --- /dev/null +++ b/res/interpolator/decelerate_quint.xml @@ -0,0 +1,21 @@ + + + + diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index e5a17c0d7e..60efcea6d4 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2744,6 +2744,10 @@ public class Launcher extends Activity v.getMeasuredWidth(), v.getMeasuredHeight()); optsBundle = opts.toBundle(); } + if (useLaunchAnimation && Utilities.isLmp()) { + ActivityOptions opts = ActivityOptions.makeCustomAnimation(this, R.anim.task_open_enter, R.anim.no_anim); + optsBundle = opts.toBundle(); + } if (user == null || user.equals(UserHandleCompat.myUserHandle())) { // Could be launching some bookkeeping activity