mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Tie prediction text to all apps interpolator
Now floating headers get 2 interpolators: one for the header content itselt, and one for the all apps content that follows. That way, they can choose to intperolate part of their content as if it were part of all apps instead of the header. Currently, we do this to animate predicted icons quickly, followed by the all apps icons, predictions text, all apps scrollbar, and all apps divider as you continue swiping. Bug: 132455160 Change-Id: Ib3e373c291e174e1306a53854d0ad4dc29eb4b76
This commit is contained in:
@@ -7,6 +7,7 @@ import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.LauncherState.VERTICAL_SWIPE_INDICATOR;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_FADE;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_HEADER_FADE;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRESS;
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
@@ -208,13 +209,14 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
PropertySetter setter = config == null ? NO_ANIM_PROPERTY_SETTER
|
||||
: config.getPropertySetter(builder);
|
||||
boolean hasHeaderExtra = (visibleElements & ALL_APPS_HEADER_EXTRA) != 0;
|
||||
boolean hasContent = (visibleElements & ALL_APPS_CONTENT) != 0;
|
||||
boolean hasAllAppsContent = (visibleElements & ALL_APPS_CONTENT) != 0;
|
||||
|
||||
Interpolator allAppsFade = builder.getInterpolator(ANIM_ALL_APPS_FADE, LINEAR);
|
||||
setter.setViewAlpha(mAppsView.getContentView(), hasContent ? 1 : 0, allAppsFade);
|
||||
setter.setViewAlpha(mAppsView.getScrollBar(), hasContent ? 1 : 0, allAppsFade);
|
||||
mAppsView.getFloatingHeaderView().setContentVisibility(hasHeaderExtra, hasContent, setter,
|
||||
allAppsFade);
|
||||
Interpolator headerFade = builder.getInterpolator(ANIM_ALL_APPS_HEADER_FADE, allAppsFade);
|
||||
setter.setViewAlpha(mAppsView.getContentView(), hasAllAppsContent ? 1 : 0, allAppsFade);
|
||||
setter.setViewAlpha(mAppsView.getScrollBar(), hasAllAppsContent ? 1 : 0, allAppsFade);
|
||||
mAppsView.getFloatingHeaderView().setContentVisibility(hasHeaderExtra, hasAllAppsContent,
|
||||
setter, headerFade, allAppsFade);
|
||||
mAppsView.getSearchUiManager().setContentVisibility(visibleElements, setter, allAppsFade);
|
||||
|
||||
setter.setInt(mScrimView, ScrimView.DRAG_HANDLE_ALPHA,
|
||||
|
||||
Reference in New Issue
Block a user