Loading quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +3 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ public class QuickstepAtomicAnimationFactory extends 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD)); config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_ACCELERATE); if (!isTablet) { config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT); } } else if (fromState == NORMAL && toState == ALL_APPS) { if (mActivity.getDeviceProfile().isTablet) { config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_DECELERATE); Loading res/values/styles.xml +14 −14 Original line number Diff line number Diff line Loading @@ -44,9 +44,9 @@ <item name="isMainColorDark">false</item> <item name="isWorkspaceDarkText">false</item> <item name="workspaceTextColor">@color/workspace_text_color_light</item> <item name="workspaceShadowColor">#ff000000</item> <item name="workspaceAmbientShadowColor">#33000000</item> <item name="workspaceKeyShadowColor">#ff000000</item> <item name="workspaceShadowColor">#B0000000</item> <item name="workspaceAmbientShadowColor">#40000000</item> <item name="workspaceKeyShadowColor">#89000000</item> <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderDotColor">@color/folder_dot_color</item> Loading Loading @@ -82,9 +82,9 @@ <style name="LauncherTheme.DarkText" parent="@style/LauncherTheme"> <item name="workspaceTextColor">@color/workspace_text_color_dark</item> <item name="workspaceShadowColor">#ffffffff</item> <item name="workspaceAmbientShadowColor">#33ffffff</item> <item name="workspaceKeyShadowColor">#ffffffff</item> <item name="workspaceShadowColor">@android:color/transparent</item> <item name="workspaceAmbientShadowColor">@android:color/transparent</item> <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item> Loading Loading @@ -132,9 +132,9 @@ <style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark"> <item name="android:colorControlHighlight">#19212121</item> <item name="workspaceTextColor">@color/workspace_text_color_dark</item> <item name="workspaceShadowColor">#ffffffff</item> <item name="workspaceAmbientShadowColor">#33ffffff</item> <item name="workspaceKeyShadowColor">#ffffffff</item> <item name="workspaceShadowColor">@android:color/transparent</item> <item name="workspaceAmbientShadowColor">@android:color/transparent</item> <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item> Loading Loading @@ -250,14 +250,14 @@ <!-- Icon displayed on the workspace --> <style name="BaseIcon.Workspace.Shadows" parent="BaseIcon"> <item name="android:shadowRadius">1.0</item> <item name="android:shadowRadius">2.0</item> <item name="android:shadowColor">?attr/workspaceShadowColor</item> <item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item> <item name="ambientShadowBlur">1.0dp</item> <item name="ambientShadowBlur">1.5dp</item> <item name="keyShadowColor">?attr/workspaceKeyShadowColor</item> <item name="keyShadowBlur">1.0dp</item> <item name="keyShadowOffsetX">0dp</item> <item name="keyShadowOffsetY">0dp</item> <item name="keyShadowBlur">.5dp</item> <item name="keyShadowOffsetX">.5dp</item> <item name="keyShadowOffsetY">.5dp</item> </style> <!-- Intentionally empty so we can override --> Loading src/com/android/launcher3/touch/AllAppsSwipeController.java +5 −2 Original line number Diff line number Diff line Loading @@ -65,13 +65,13 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { public static final Interpolator BLUR = Interpolators.clampToProgress( Interpolators.mapToProgress( EMPHASIZED_DECELERATE, 0f, ALL_APPS_FULL_DEPTH_PROGRESS), LINEAR, 0f, ALL_APPS_FULL_DEPTH_PROGRESS), WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); public static final Interpolator WORKSPACE_FADE = Interpolators.clampToProgress(FINAL_FRAME, 0f, ALL_APPS_STATE_TRANSITION); public static final Interpolator WORKSPACE_SCALE = Interpolators.clampToProgress( EMPHASIZED_DECELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); EMPHASIZED_ACCELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); public static final Interpolator HOTSEAT_FADE = WORKSPACE_FADE; public static final Interpolator HOTSEAT_SCALE = HOTSEAT_FADE; public static final Interpolator HOTSEAT_TRANSLATE = Loading Loading @@ -157,6 +157,9 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); if (!isTablet) { config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT); } } /** Loading src/com/android/launcher3/views/DoubleShadowBubbleTextView.java +13 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.launcher3.views; import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; Loading Loading @@ -54,10 +56,11 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { super.onDraw(canvas); return; } int alpha = Color.alpha(getCurrentTextColor()); // We enhance the shadow by drawing the shadow twice getPaint().setShadowLayer(mShadowInfo.ambientShadowBlur, 0, 0, mShadowInfo.ambientShadowColor); getTextShadowColor(mShadowInfo.ambientShadowColor, alpha)); drawWithoutDot(canvas); canvas.save(); Loading @@ -69,7 +72,7 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { mShadowInfo.keyShadowBlur, mShadowInfo.keyShadowOffsetX, mShadowInfo.keyShadowOffsetY, mShadowInfo.keyShadowColor); getTextShadowColor(mShadowInfo.keyShadowColor, alpha)); drawWithoutDot(canvas); canvas.restore(); Loading Loading @@ -110,18 +113,24 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { return true; } else if (ambientShadowAlpha > 0 && keyShadowAlpha == 0) { textView.getPaint().setShadowLayer(ambientShadowBlur, 0, 0, ambientShadowColor); getTextShadowColor(ambientShadowColor, textAlpha)); return true; } else if (keyShadowAlpha > 0 && ambientShadowAlpha == 0) { textView.getPaint().setShadowLayer( keyShadowBlur, keyShadowOffsetX, keyShadowOffsetY, keyShadowColor); getTextShadowColor(keyShadowColor, textAlpha)); return true; } else { return false; } } } // Multiplies the alpha of shadowColor by textAlpha. private static int getTextShadowColor(int shadowColor, int textAlpha) { return setColorAlphaBound(shadowColor, Math.round(Color.alpha(shadowColor) * textAlpha / 255f)); } } Loading
quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +3 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ public class QuickstepAtomicAnimationFactory extends 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD)); config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_ACCELERATE); if (!isTablet) { config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT); } } else if (fromState == NORMAL && toState == ALL_APPS) { if (mActivity.getDeviceProfile().isTablet) { config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_DECELERATE); Loading
res/values/styles.xml +14 −14 Original line number Diff line number Diff line Loading @@ -44,9 +44,9 @@ <item name="isMainColorDark">false</item> <item name="isWorkspaceDarkText">false</item> <item name="workspaceTextColor">@color/workspace_text_color_light</item> <item name="workspaceShadowColor">#ff000000</item> <item name="workspaceAmbientShadowColor">#33000000</item> <item name="workspaceKeyShadowColor">#ff000000</item> <item name="workspaceShadowColor">#B0000000</item> <item name="workspaceAmbientShadowColor">#40000000</item> <item name="workspaceKeyShadowColor">#89000000</item> <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderDotColor">@color/folder_dot_color</item> Loading Loading @@ -82,9 +82,9 @@ <style name="LauncherTheme.DarkText" parent="@style/LauncherTheme"> <item name="workspaceTextColor">@color/workspace_text_color_dark</item> <item name="workspaceShadowColor">#ffffffff</item> <item name="workspaceAmbientShadowColor">#33ffffff</item> <item name="workspaceKeyShadowColor">#ffffffff</item> <item name="workspaceShadowColor">@android:color/transparent</item> <item name="workspaceAmbientShadowColor">@android:color/transparent</item> <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item> Loading Loading @@ -132,9 +132,9 @@ <style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark"> <item name="android:colorControlHighlight">#19212121</item> <item name="workspaceTextColor">@color/workspace_text_color_dark</item> <item name="workspaceShadowColor">#ffffffff</item> <item name="workspaceAmbientShadowColor">#33ffffff</item> <item name="workspaceKeyShadowColor">#ffffffff</item> <item name="workspaceShadowColor">@android:color/transparent</item> <item name="workspaceAmbientShadowColor">@android:color/transparent</item> <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item> Loading Loading @@ -250,14 +250,14 @@ <!-- Icon displayed on the workspace --> <style name="BaseIcon.Workspace.Shadows" parent="BaseIcon"> <item name="android:shadowRadius">1.0</item> <item name="android:shadowRadius">2.0</item> <item name="android:shadowColor">?attr/workspaceShadowColor</item> <item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item> <item name="ambientShadowBlur">1.0dp</item> <item name="ambientShadowBlur">1.5dp</item> <item name="keyShadowColor">?attr/workspaceKeyShadowColor</item> <item name="keyShadowBlur">1.0dp</item> <item name="keyShadowOffsetX">0dp</item> <item name="keyShadowOffsetY">0dp</item> <item name="keyShadowBlur">.5dp</item> <item name="keyShadowOffsetX">.5dp</item> <item name="keyShadowOffsetY">.5dp</item> </style> <!-- Intentionally empty so we can override --> Loading
src/com/android/launcher3/touch/AllAppsSwipeController.java +5 −2 Original line number Diff line number Diff line Loading @@ -65,13 +65,13 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { public static final Interpolator BLUR = Interpolators.clampToProgress( Interpolators.mapToProgress( EMPHASIZED_DECELERATE, 0f, ALL_APPS_FULL_DEPTH_PROGRESS), LINEAR, 0f, ALL_APPS_FULL_DEPTH_PROGRESS), WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); public static final Interpolator WORKSPACE_FADE = Interpolators.clampToProgress(FINAL_FRAME, 0f, ALL_APPS_STATE_TRANSITION); public static final Interpolator WORKSPACE_SCALE = Interpolators.clampToProgress( EMPHASIZED_DECELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); EMPHASIZED_ACCELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION); public static final Interpolator HOTSEAT_FADE = WORKSPACE_FADE; public static final Interpolator HOTSEAT_SCALE = HOTSEAT_FADE; public static final Interpolator HOTSEAT_TRANSLATE = Loading Loading @@ -157,6 +157,9 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); if (!isTablet) { config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT); } } /** Loading
src/com/android/launcher3/views/DoubleShadowBubbleTextView.java +13 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.launcher3.views; import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; Loading Loading @@ -54,10 +56,11 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { super.onDraw(canvas); return; } int alpha = Color.alpha(getCurrentTextColor()); // We enhance the shadow by drawing the shadow twice getPaint().setShadowLayer(mShadowInfo.ambientShadowBlur, 0, 0, mShadowInfo.ambientShadowColor); getTextShadowColor(mShadowInfo.ambientShadowColor, alpha)); drawWithoutDot(canvas); canvas.save(); Loading @@ -69,7 +72,7 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { mShadowInfo.keyShadowBlur, mShadowInfo.keyShadowOffsetX, mShadowInfo.keyShadowOffsetY, mShadowInfo.keyShadowColor); getTextShadowColor(mShadowInfo.keyShadowColor, alpha)); drawWithoutDot(canvas); canvas.restore(); Loading Loading @@ -110,18 +113,24 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { return true; } else if (ambientShadowAlpha > 0 && keyShadowAlpha == 0) { textView.getPaint().setShadowLayer(ambientShadowBlur, 0, 0, ambientShadowColor); getTextShadowColor(ambientShadowColor, textAlpha)); return true; } else if (keyShadowAlpha > 0 && ambientShadowAlpha == 0) { textView.getPaint().setShadowLayer( keyShadowBlur, keyShadowOffsetX, keyShadowOffsetY, keyShadowColor); getTextShadowColor(keyShadowColor, textAlpha)); return true; } else { return false; } } } // Multiplies the alpha of shadowColor by textAlpha. private static int getTextShadowColor(int shadowColor, int textAlpha) { return setColorAlphaBound(shadowColor, Math.round(Color.alpha(shadowColor) * textAlpha / 255f)); } }