Methods Summary |
---|
public void | prepareEnterRecentsAnimation()Prepares the scrim views for animating when entering Recents. This will be called before
the first draw.
mHasNavBarScrim = mConfig.hasNavBarScrim();
mShouldAnimateNavBarScrim = mConfig.shouldAnimateNavBarScrim();
mHasStatusBarScrim = mConfig.hasStatusBarScrim();
mShouldAnimateStatusBarScrim = mConfig.shouldAnimateStatusBarScrim();
mNavBarScrimView.setVisibility(mHasNavBarScrim && !mShouldAnimateNavBarScrim ?
View.VISIBLE : View.INVISIBLE);
mStatusBarScrimView.setVisibility(mHasStatusBarScrim && !mShouldAnimateStatusBarScrim ?
View.VISIBLE : View.INVISIBLE);
|
public void | startEnterRecentsAnimation()Starts animating the scrim views when entering Recents.
if (mHasStatusBarScrim && mShouldAnimateStatusBarScrim) {
mStatusBarScrimView.setTranslationY(-mStatusBarScrimView.getMeasuredHeight());
mStatusBarScrimView.animate()
.translationY(0)
.setStartDelay(mConfig.launchedFromHome ?
mConfig.transitionEnterFromHomeDelay :
mConfig.transitionEnterFromAppDelay)
.setDuration(mConfig.navBarScrimEnterDuration)
.setInterpolator(mConfig.quintOutInterpolator)
.withStartAction(new Runnable() {
@Override
public void run() {
mStatusBarScrimView.setVisibility(View.VISIBLE);
}
})
.start();
}
if (mHasNavBarScrim && mShouldAnimateNavBarScrim) {
mNavBarScrimView.setTranslationY(mNavBarScrimView.getMeasuredHeight());
mNavBarScrimView.animate()
.translationY(0)
.setStartDelay(mConfig.launchedFromHome ?
mConfig.transitionEnterFromHomeDelay :
mConfig.transitionEnterFromAppDelay)
.setDuration(mConfig.navBarScrimEnterDuration)
.setInterpolator(mConfig.quintOutInterpolator)
.withStartAction(new Runnable() {
@Override
public void run() {
mNavBarScrimView.setVisibility(View.VISIBLE);
}
})
.start();
}
|
public void | startExitRecentsAnimation()Starts animating the scrim views when leaving Recents (either via launching a task, or
going home).
if (mHasStatusBarScrim && mShouldAnimateStatusBarScrim) {
mStatusBarScrimView.animate()
.translationY(-mStatusBarScrimView.getMeasuredHeight())
.setStartDelay(0)
.setDuration(mConfig.taskViewExitToAppDuration)
.setInterpolator(mConfig.fastOutSlowInInterpolator)
.start();
}
if (mHasNavBarScrim && mShouldAnimateNavBarScrim) {
mNavBarScrimView.animate()
.translationY(mNavBarScrimView.getMeasuredHeight())
.setStartDelay(0)
.setDuration(mConfig.taskViewExitToAppDuration)
.setInterpolator(mConfig.fastOutSlowInInterpolator)
.start();
}
|