Loading src/com/android/launcher3/folder/PreviewBackground.java +17 −7 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ import com.android.launcher3.views.ActivityContext; */ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { private static final boolean DRAW_SHADOW = false; private static final int CONSUMPTION_ANIMATION_DURATION = 100; private final PorterDuffXfermode mShadowPorterDuffXfermode Loading Loading @@ -163,6 +165,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { // Stroke width is 1dp mStrokeWidth = context.getResources().getDisplayMetrics().density; if (DRAW_SHADOW) { float radius = getScaledRadius(); float shadowRadius = radius + mStrokeWidth; int shadowColor = Color.argb(SHADOW_OPACITY, 0, 0, 0); Loading @@ -170,6 +173,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { new int[]{shadowColor, Color.TRANSPARENT}, new float[]{radius / shadowRadius, 1}, Shader.TileMode.CLAMP); } invalidate(); } Loading Loading @@ -239,6 +243,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { } public void drawShadow(Canvas canvas) { if (!DRAW_SHADOW) { return; } if (mShadowShader == null) { return; } Loading Loading @@ -277,6 +284,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { } public void fadeInBackgroundShadow() { if (!DRAW_SHADOW) { return; } if (mShadowAnimator != null) { mShadowAnimator.cancel(); } Loading Loading
src/com/android/launcher3/folder/PreviewBackground.java +17 −7 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ import com.android.launcher3.views.ActivityContext; */ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { private static final boolean DRAW_SHADOW = false; private static final int CONSUMPTION_ANIMATION_DURATION = 100; private final PorterDuffXfermode mShadowPorterDuffXfermode Loading Loading @@ -163,6 +165,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { // Stroke width is 1dp mStrokeWidth = context.getResources().getDisplayMetrics().density; if (DRAW_SHADOW) { float radius = getScaledRadius(); float shadowRadius = radius + mStrokeWidth; int shadowColor = Color.argb(SHADOW_OPACITY, 0, 0, 0); Loading @@ -170,6 +173,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { new int[]{shadowColor, Color.TRANSPARENT}, new float[]{radius / shadowRadius, 1}, Shader.TileMode.CLAMP); } invalidate(); } Loading Loading @@ -239,6 +243,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { } public void drawShadow(Canvas canvas) { if (!DRAW_SHADOW) { return; } if (mShadowShader == null) { return; } Loading Loading @@ -277,6 +284,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { } public void fadeInBackgroundShadow() { if (!DRAW_SHADOW) { return; } if (mShadowAnimator != null) { mShadowAnimator.cancel(); } Loading