diff options
author | Tony Wickham <twickham@google.com> | 2018-03-21 08:16:33 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-03-21 12:15:48 -0700 |
commit | bd6f05e0b6f57a8bb7f21bcaf17d0eebe8b0fe7c (patch) | |
tree | c89425603b17c606613337298164e914e0c6a9cf /src/com/android/launcher3/WorkspaceStateTransitionAnimation.java | |
parent | c1b6157398c3af353983436ca9e4f4f1f108b221 (diff) | |
download | android_packages_apps_Trebuchet-bd6f05e0b6f57a8bb7f21bcaf17d0eebe8b0fe7c.tar.gz android_packages_apps_Trebuchet-bd6f05e0b6f57a8bb7f21bcaf17d0eebe8b0fe7c.tar.bz2 android_packages_apps_Trebuchet-bd6f05e0b6f57a8bb7f21bcaf17d0eebe8b0fe7c.zip |
Separate some elements to set visibility separately
Added entries for:
- All apps header extra content
- Hotseat extra content
Change-Id: I47c4ccfe3b54fd47cbbee88698ed045611e3e92d
Diffstat (limited to 'src/com/android/launcher3/WorkspaceStateTransitionAnimation.java')
-rw-r--r-- | src/com/android/launcher3/WorkspaceStateTransitionAnimation.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java index 63c118125..66ea4d48b 100644 --- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java @@ -18,16 +18,10 @@ package com.android.launcher3; import static com.android.launcher3.LauncherAnimUtils.DRAWABLE_ALPHA; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; -import static com.android.launcher3.LauncherState.HOTSEAT; +import static com.android.launcher3.LauncherState.HOTSEAT_EXTRA; +import static com.android.launcher3.LauncherState.HOTSEAT_ICONS; import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER; -import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled; - -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; -import android.animation.ObjectAnimator; -import android.animation.TimeInterpolator; -import android.animation.ValueAnimator; -import android.util.Property; + import android.view.View; import com.android.launcher3.LauncherState.PageAlphaProvider; @@ -36,6 +30,7 @@ import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.graphics.ViewScrim; +import com.android.launcher3.uioverrides.UiFactory; /** * Manages the animations between each of the workspace states. @@ -85,11 +80,14 @@ public class WorkspaceStateTransitionAnimation { scaleAndTranslation[2], Interpolators.ZOOM_IN); int elements = state.getVisibleElements(mLauncher); - float hotseatAlpha = (elements & HOTSEAT) != 0 ? 1 : 0; - propertySetter.setViewAlpha(mLauncher.getHotseat(), hotseatAlpha, + float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0; + float hotseatExtraAlpha = (elements & HOTSEAT_EXTRA) != 0 ? 1 : 0; + propertySetter.setViewAlpha(mLauncher.getHotseat().getLayout(), hotseatIconsAlpha, pageAlphaProvider.interpolator); + propertySetter.setViewAlpha(UiFactory.getHotseatExtraContent(mLauncher.getHotseat()), + hotseatExtraAlpha, pageAlphaProvider.interpolator); propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(), - hotseatAlpha, pageAlphaProvider.interpolator); + hotseatIconsAlpha, pageAlphaProvider.interpolator); // Set scrim propertySetter.setFloat(ViewScrim.get(mWorkspace), ViewScrim.PROGRESS, |