Search in sources :

Example 1 with SpringLoadedState

use of com.android.launcher3.states.SpringLoadedState in project android_packages_apps_Launcher3 by crdroidandroid.

the class WorkspaceStateTransitionAnimation method applyChildState.

private void applyChildState(LauncherState state, CellLayout cl, int childIndex, PageAlphaProvider pageAlphaProvider, PropertySetter propertySetter, StateAnimationConfig config) {
    float pageAlpha = pageAlphaProvider.getPageAlpha(childIndex);
    float springLoadedProgress = (state instanceof SpringLoadedState) ? 1.0f : 0f;
    propertySetter.setFloat(cl, CellLayout.SPRING_LOADED_PROGRESS, springLoadedProgress, ZOOM_OUT);
    Interpolator fadeInterpolator = config.getInterpolator(ANIM_WORKSPACE_FADE, pageAlphaProvider.interpolator);
    propertySetter.setFloat(cl.getShortcutsAndWidgets(), VIEW_ALPHA, pageAlpha, fadeInterpolator);
}
Also used : SpringLoadedState(com.android.launcher3.states.SpringLoadedState) Interpolator(android.view.animation.Interpolator)

Aggregations

Interpolator (android.view.animation.Interpolator)1 SpringLoadedState (com.android.launcher3.states.SpringLoadedState)1