OSDN Git Service

Remove background scrim when there are no top insets.
authorJon Miranda <jonmiranda@google.com>
Wed, 26 Apr 2017 17:47:37 +0000 (10:47 -0700)
committerJon Miranda <jonmiranda@google.com>
Mon, 1 May 2017 19:05:10 +0000 (12:05 -0700)
ie. In portrait multiwindow mode, the launcher is always on the
bottom so we can remove the background scrim that is meant to
protect the status bar contents.

Bug: 36397512
Change-Id: Ie9655b0604b5bebafdfb4153b370bb655129051c

src/com/android/launcher3/dragndrop/DragLayer.java

index 14f4e6c..7178c5e 100644 (file)
@@ -449,6 +449,12 @@ public class DragLayer extends InsettableFrameLayout {
     }
 
     @Override
+    public void setInsets(Rect insets) {
+        super.setInsets(insets);
+        setBackgroundResource(insets.top == 0 ? 0 : R.drawable.workspace_bg);
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }