Loading src/com/android/launcher3/BubbleTextView.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -592,6 +592,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver { mIconLoadRequest = null; mIconLoadRequest = null; mDisableRelayout = true; mDisableRelayout = true; // Optimization: Starting in N, pre-uploads the bitmap to RenderThread. info.iconBitmap.prepareToDraw(); if (info instanceof AppInfo) { if (info instanceof AppInfo) { applyFromApplicationInfo((AppInfo) info); applyFromApplicationInfo((AppInfo) info); } else if (info instanceof ShortcutInfo) { } else if (info instanceof ShortcutInfo) { Loading src/com/android/launcher3/LauncherStateTransitionAnimation.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -338,8 +338,10 @@ public class LauncherStateTransitionAnimation { toView.post(new StartAnimRunnable(animation, toView)); toView.post(new StartAnimRunnable(animation, toView)); mCurrentAnimation = animation; mCurrentAnimation = animation; } else if (animType == PULLUP) { } else if (animType == PULLUP) { // We are animating the content view alpha, so ensure we have a layer for it if (!FeatureFlags.LAUNCHER3_PHYSICS) { // We are animating the content view alpha, so ensure we have a layer for it. layerViews.addView(contentView); layerViews.addView(contentView); } animation.addListener(new AnimatorListenerAdapter() { animation.addListener(new AnimatorListenerAdapter() { @Override @Override Loading src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +22 −14 Original line number Original line Diff line number Diff line Loading @@ -274,7 +274,6 @@ public class WorkspaceStateTransitionAnimation { 1.0f : 0f; 1.0f : 0f; float finalHotseatAlpha = (states.stateIsNormal || states.stateIsSpringLoaded || float finalHotseatAlpha = (states.stateIsNormal || states.stateIsSpringLoaded || (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; float finalOverviewPanelAlpha = states.stateIsOverview ? 1f : 0f; float finalQsbAlpha = (states.stateIsNormal || float finalQsbAlpha = (states.stateIsNormal || (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; Loading Loading @@ -359,38 +358,47 @@ public class WorkspaceStateTransitionAnimation { final ViewGroup overviewPanel = mLauncher.getOverviewPanel(); final ViewGroup overviewPanel = mLauncher.getOverviewPanel(); float finalOverviewPanelAlpha = states.stateIsOverview ? 1f : 0f; if (animated) { if (animated) { // This is true when transitioning between: // - Overview <-> Workspace // - Overview <-> Widget Tray if (finalOverviewPanelAlpha != overviewPanel.getAlpha()) { Animator overviewPanelAlpha = ObjectAnimator.ofFloat( overviewPanel, View.ALPHA, finalOverviewPanelAlpha); overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel, accessibilityEnabled)); layerViews.addView(overviewPanel); if (states.overviewToWorkspace) { overviewPanelAlpha.setInterpolator(new DecelerateInterpolator(2)); } else if (states.workspaceToOverview) { overviewPanelAlpha.setInterpolator(null); } overviewPanelAlpha.setDuration(duration); mStateAnimator.play(overviewPanelAlpha); } Animator scale = LauncherAnimUtils.ofPropertyValuesHolder(mWorkspace, Animator scale = LauncherAnimUtils.ofPropertyValuesHolder(mWorkspace, new PropertyListBuilder().scale(mNewScale) new PropertyListBuilder().scale(mNewScale) .translationY(finalWorkspaceTranslationY).build()) .translationY(finalWorkspaceTranslationY).build()) .setDuration(duration); .setDuration(duration); scale.setInterpolator(mZoomInInterpolator); scale.setInterpolator(mZoomInInterpolator); mStateAnimator.play(scale); mStateAnimator.play(scale); Animator hotseatAlpha = mWorkspace.createHotseatAlphaAnimator(finalHotseatAlpha); Animator overviewPanelAlpha = ObjectAnimator.ofFloat( overviewPanel, View.ALPHA, finalOverviewPanelAlpha); overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel, accessibilityEnabled)); // For animation optimization, we may need to provide the Launcher transition // For animation optimization, we may need to provide the Launcher transition // with a set of views on which to force build and manage layers in certain scenarios. // with a set of views on which to force build and manage layers in certain scenarios. layerViews.addView(overviewPanel); layerViews.addView(mLauncher.getHotseat()); layerViews.addView(mLauncher.getHotseat()); layerViews.addView(mWorkspace.getPageIndicator()); layerViews.addView(mWorkspace.getPageIndicator()); Animator hotseatAlpha = mWorkspace.createHotseatAlphaAnimator(finalHotseatAlpha); if (states.workspaceToOverview) { if (states.workspaceToOverview) { hotseatAlpha.setInterpolator(new DecelerateInterpolator(2)); hotseatAlpha.setInterpolator(new DecelerateInterpolator(2)); overviewPanelAlpha.setInterpolator(null); } else if (states.overviewToWorkspace) { } else if (states.overviewToWorkspace) { hotseatAlpha.setInterpolator(null); hotseatAlpha.setInterpolator(null); overviewPanelAlpha.setInterpolator(new DecelerateInterpolator(2)); } } overviewPanelAlpha.setDuration(duration); hotseatAlpha.setDuration(duration); hotseatAlpha.setDuration(duration); mStateAnimator.play(overviewPanelAlpha); mStateAnimator.play(hotseatAlpha); mStateAnimator.play(hotseatAlpha); mStateAnimator.addListener(new AnimatorListenerAdapter() { mStateAnimator.addListener(new AnimatorListenerAdapter() { boolean canceled = false; boolean canceled = false; Loading Loading
src/com/android/launcher3/BubbleTextView.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -592,6 +592,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver { mIconLoadRequest = null; mIconLoadRequest = null; mDisableRelayout = true; mDisableRelayout = true; // Optimization: Starting in N, pre-uploads the bitmap to RenderThread. info.iconBitmap.prepareToDraw(); if (info instanceof AppInfo) { if (info instanceof AppInfo) { applyFromApplicationInfo((AppInfo) info); applyFromApplicationInfo((AppInfo) info); } else if (info instanceof ShortcutInfo) { } else if (info instanceof ShortcutInfo) { Loading
src/com/android/launcher3/LauncherStateTransitionAnimation.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -338,8 +338,10 @@ public class LauncherStateTransitionAnimation { toView.post(new StartAnimRunnable(animation, toView)); toView.post(new StartAnimRunnable(animation, toView)); mCurrentAnimation = animation; mCurrentAnimation = animation; } else if (animType == PULLUP) { } else if (animType == PULLUP) { // We are animating the content view alpha, so ensure we have a layer for it if (!FeatureFlags.LAUNCHER3_PHYSICS) { // We are animating the content view alpha, so ensure we have a layer for it. layerViews.addView(contentView); layerViews.addView(contentView); } animation.addListener(new AnimatorListenerAdapter() { animation.addListener(new AnimatorListenerAdapter() { @Override @Override Loading
src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +22 −14 Original line number Original line Diff line number Diff line Loading @@ -274,7 +274,6 @@ public class WorkspaceStateTransitionAnimation { 1.0f : 0f; 1.0f : 0f; float finalHotseatAlpha = (states.stateIsNormal || states.stateIsSpringLoaded || float finalHotseatAlpha = (states.stateIsNormal || states.stateIsSpringLoaded || (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; float finalOverviewPanelAlpha = states.stateIsOverview ? 1f : 0f; float finalQsbAlpha = (states.stateIsNormal || float finalQsbAlpha = (states.stateIsNormal || (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f; Loading Loading @@ -359,38 +358,47 @@ public class WorkspaceStateTransitionAnimation { final ViewGroup overviewPanel = mLauncher.getOverviewPanel(); final ViewGroup overviewPanel = mLauncher.getOverviewPanel(); float finalOverviewPanelAlpha = states.stateIsOverview ? 1f : 0f; if (animated) { if (animated) { // This is true when transitioning between: // - Overview <-> Workspace // - Overview <-> Widget Tray if (finalOverviewPanelAlpha != overviewPanel.getAlpha()) { Animator overviewPanelAlpha = ObjectAnimator.ofFloat( overviewPanel, View.ALPHA, finalOverviewPanelAlpha); overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel, accessibilityEnabled)); layerViews.addView(overviewPanel); if (states.overviewToWorkspace) { overviewPanelAlpha.setInterpolator(new DecelerateInterpolator(2)); } else if (states.workspaceToOverview) { overviewPanelAlpha.setInterpolator(null); } overviewPanelAlpha.setDuration(duration); mStateAnimator.play(overviewPanelAlpha); } Animator scale = LauncherAnimUtils.ofPropertyValuesHolder(mWorkspace, Animator scale = LauncherAnimUtils.ofPropertyValuesHolder(mWorkspace, new PropertyListBuilder().scale(mNewScale) new PropertyListBuilder().scale(mNewScale) .translationY(finalWorkspaceTranslationY).build()) .translationY(finalWorkspaceTranslationY).build()) .setDuration(duration); .setDuration(duration); scale.setInterpolator(mZoomInInterpolator); scale.setInterpolator(mZoomInInterpolator); mStateAnimator.play(scale); mStateAnimator.play(scale); Animator hotseatAlpha = mWorkspace.createHotseatAlphaAnimator(finalHotseatAlpha); Animator overviewPanelAlpha = ObjectAnimator.ofFloat( overviewPanel, View.ALPHA, finalOverviewPanelAlpha); overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel, accessibilityEnabled)); // For animation optimization, we may need to provide the Launcher transition // For animation optimization, we may need to provide the Launcher transition // with a set of views on which to force build and manage layers in certain scenarios. // with a set of views on which to force build and manage layers in certain scenarios. layerViews.addView(overviewPanel); layerViews.addView(mLauncher.getHotseat()); layerViews.addView(mLauncher.getHotseat()); layerViews.addView(mWorkspace.getPageIndicator()); layerViews.addView(mWorkspace.getPageIndicator()); Animator hotseatAlpha = mWorkspace.createHotseatAlphaAnimator(finalHotseatAlpha); if (states.workspaceToOverview) { if (states.workspaceToOverview) { hotseatAlpha.setInterpolator(new DecelerateInterpolator(2)); hotseatAlpha.setInterpolator(new DecelerateInterpolator(2)); overviewPanelAlpha.setInterpolator(null); } else if (states.overviewToWorkspace) { } else if (states.overviewToWorkspace) { hotseatAlpha.setInterpolator(null); hotseatAlpha.setInterpolator(null); overviewPanelAlpha.setInterpolator(new DecelerateInterpolator(2)); } } overviewPanelAlpha.setDuration(duration); hotseatAlpha.setDuration(duration); hotseatAlpha.setDuration(duration); mStateAnimator.play(overviewPanelAlpha); mStateAnimator.play(hotseatAlpha); mStateAnimator.play(hotseatAlpha); mStateAnimator.addListener(new AnimatorListenerAdapter() { mStateAnimator.addListener(new AnimatorListenerAdapter() { boolean canceled = false; boolean canceled = false; Loading