Attached the navigation bar to app for launching from Launcher

- Play the nav bar fade-out animation at the same time when the app
  launching animation starts and make the fade-in animation ends at the
  same time when app launching animation ends.
- To make the nav bar fade-in animation looks like it's attached to the
  app, apply crop rect and translation that the app targets apply to the
  nav target.

Bug: 181638132
Test: manual: click app icon on launcher to launch an activity and
observe the navigation bar animation.

Change-Id: If7e610eca5fccbb747a76c87335a600b018195a6
This commit is contained in:
shawnlin authored and Shawn Lin committed 2021-04-09 04:04:42 +00:00
1 parent 12eeecc36b
commit ffb976c404
13 files changed
+137 -29

No files matched your search

@@ -117,11 +117,18 @@ public class PendingAnimation implements PropertySetter {
* Adds a callback to be run on every frame of the animation
*/
public void addOnFrameCallback(Runnable runnable) {
addOnFrameListener(anim -> runnable.run());
}
/**
* Adds a listener to be run on every frame of the animation
*/
public void addOnFrameListener(ValueAnimator.AnimatorUpdateListener listener) {
if (mProgressAnimator == null) {
mProgressAnimator = ValueAnimator.ofFloat(0, 1);
}
mProgressAnimator.addUpdateListener(anim -> runnable.run());
mProgressAnimator.addUpdateListener(listener);
}
/**