From 15fa3246d8091e6ab3956fd0a833fdd8daa9d6fb Mon Sep 17 00:00:00 2001 From: Jiaquan He Date: Thu, 5 Jan 2017 14:34:44 -0800 Subject: [PATCH] 2D Recents: Show shadows behind task views. Test: Checked that there's a shadow behind each task view in Grid-based Recents on local sw600dp device. Bug: 32101881 Change-Id: I2cb2c0f73cbe23c4dcce5a4839965fdff13a0df5 --- .../systemui/recents/views/grid/TaskGridLayoutAlgorithm.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java index be3af040c7485..fa8e943a7e3b7 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java @@ -145,8 +145,11 @@ public class TaskGridLayoutAlgorithm { int y = gridInfo.yOffsets[taskIndex]; float z = stackLayout.mMaxTranslationZ; + // We always set the dim alpha to 0, since we don't want grid task views to dim. float dimAlpha = 0f; - float viewOutlineAlpha = 0f; + // We always set the alpha of the view outline to 1, to make sure the shadow is visible. + float viewOutlineAlpha = 1f; + // We also need to invert the index in order to display the most recent tasks first. int taskLayoutIndex = taskCount - taskIndex - 1; boolean isTaskViewVisible = (taskLayoutIndex < MAX_LAYOUT_TASK_COUNT);