2D Recents: use a different background color for drop targets

Bug: 32101881
Test: Checked layout and animations in Recents, on local sw600dp device.
Change-Id: I628bd0866691e5badd7a37c88020e1e10e1902f7
This commit is contained in:
Manu Cornet
2017-01-10 13:26:25 -08:00
parent 748e78bd2c
commit 47dd7c51e9

View File

@@ -247,6 +247,9 @@ public class TaskStack {
*/ */
public static class DockState implements DropTarget { public static class DockState implements DropTarget {
public static final int DOCK_AREA_BG_COLOR = 0xFFffffff;
public static final int DOCK_AREA_GRID_BG_COLOR = 0xFF000000;
// The rotation to apply to the hint text // The rotation to apply to the hint text
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
@IntDef({HORIZONTAL, VERTICAL}) @IntDef({HORIZONTAL, VERTICAL})
@@ -319,7 +322,8 @@ public class TaskStack {
private ViewState(int areaAlpha, int hintAlpha, @TextOrientation int hintOrientation, private ViewState(int areaAlpha, int hintAlpha, @TextOrientation int hintOrientation,
int hintTextResId) { int hintTextResId) {
dockAreaAlpha = areaAlpha; dockAreaAlpha = areaAlpha;
dockAreaOverlay = new ColorDrawable(0xFFffffff); dockAreaOverlay = new ColorDrawable(Recents.getConfiguration().isGridEnabled
? DOCK_AREA_GRID_BG_COLOR : DOCK_AREA_BG_COLOR);
dockAreaOverlay.setAlpha(0); dockAreaOverlay.setAlpha(0);
hintTextAlpha = hintAlpha; hintTextAlpha = hintAlpha;
hintTextOrientation = hintOrientation; hintTextOrientation = hintOrientation;