Fixing minor bugs (5085316, 5082963, 5042828)

- Adding separator between qsb and workspace content
- Adding a bit of spacing between drawables and text in all apps
- Making the drop target area smaller...

Change-Id: I1bebe7dff20fc30e4896de1dcf23d23b62a31a07
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 215f8db..9d394d0 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -22,9 +22,18 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
+    <!-- Keep these behind the workspace so that they are not visible when
+         we go into AllApps -->
+    <include
+        android:id="@+id/qsb_divider"
+        layout="@layout/workspace_divider"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_marginLeft="@dimen/qsb_bar_height"
+        android:layout_gravity="left" />
     <include
         android:id="@+id/dock_divider"
-        layout="@layout/dock_divider"
+        layout="@layout/workspace_divider"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_marginRight="@dimen/button_bar_height"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index f7e93f0..2f8d995 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -25,8 +25,15 @@
     <!-- Keep these behind the workspace so that they are not visible when
          we go into AllApps -->
     <include
+        android:id="@+id/qsb_divider"
+        layout="@layout/workspace_divider"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/qsb_bar_height"
+        android:layout_gravity="top" />
+    <include
         android:id="@+id/dock_divider"
-        layout="@layout/dock_divider"
+        layout="@layout/workspace_divider"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginBottom="@dimen/button_bar_height"
@@ -48,8 +55,8 @@
         launcher:cellCountX="4"
         launcher:cellCountY="4"
         launcher:pageSpacing="@dimen/workspace_page_spacing"
-        launcher:scrollIndicatorPaddingLeft="@dimen/dock_divider_padding_left"
-        launcher:scrollIndicatorPaddingRight="@dimen/dock_divider_padding_right">
+        launcher:scrollIndicatorPaddingLeft="@dimen/workspace_divider_padding_left"
+        launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right">
 
         <include android:id="@+id/cell1" layout="@layout/workspace_screen" />
         <include android:id="@+id/cell2" layout="@layout/workspace_screen" />
diff --git a/res/layout/qsb_bar.xml b/res/layout/qsb_bar.xml
index abcc941..cad81f5 100644
--- a/res/layout/qsb_bar.xml
+++ b/res/layout/qsb_bar.xml
@@ -28,28 +28,26 @@
         android:id="@+id/drag_target_bar"
         android:visibility="gone">
 
-        <com.android.launcher2.DeleteDropTarget
+        <FrameLayout
             style="@style/DropTargetButtonContainer"
-            android:id="@+id/delete_target"
             android:layout_weight="1">
             <!-- Delete target -->
-            <TextView
+            <com.android.launcher2.DeleteDropTarget
                 style="@style/DropTargetButton"
                 android:id="@+id/delete_target_text"
                 android:text="@string/delete_zone_label_workspace"
                 android:drawableLeft="@drawable/delete_target_selector" />
-        </com.android.launcher2.DeleteDropTarget>
+        </FrameLayout>
 
-        <com.android.launcher2.InfoDropTarget
+        <FrameLayout
             style="@style/DropTargetButtonContainer"
-            android:id="@+id/info_target"
             android:layout_weight="1">
             <!-- Info target -->
-            <TextView
+            <com.android.launcher2.InfoDropTarget
                 style="@style/DropTargetButton"
                 android:id="@+id/info_target_text"
                 android:text="@string/info_target_label"
                 android:drawableLeft="@drawable/info_target_selector" />
-        </com.android.launcher2.InfoDropTarget>
+        </FrameLayout>
     </LinearLayout>
 </com.android.launcher2.SearchDropTargetBar>
diff --git a/res/layout/dock_divider.xml b/res/layout/workspace_divider.xml
similarity index 77%
rename from res/layout/dock_divider.xml
rename to res/layout/workspace_divider.xml
index c3cac52..257ea7c 100644
--- a/res/layout/dock_divider.xml
+++ b/res/layout/workspace_divider.xml
@@ -16,9 +16,9 @@
 <ImageView
     xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
-    android:paddingLeft="@dimen/dock_divider_padding_left"
-    android:paddingRight="@dimen/dock_divider_padding_right"
-    android:paddingTop="@dimen/dock_divider_padding_top"
-    android:paddingBottom="@dimen/dock_divider_padding_bottom"
+    android:paddingLeft="@dimen/workspace_divider_padding_left"
+    android:paddingRight="@dimen/workspace_divider_padding_right"
+    android:paddingTop="@dimen/workspace_divider_padding_top"
+    android:paddingBottom="@dimen/workspace_divider_padding_bottom"
     android:scaleType="fitXY"
     android:src="@drawable/hotseat_track_holo" />
\ No newline at end of file
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index d8cc7ef..c715bfb 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -25,10 +25,10 @@
     <dimen name="workspace_top_padding">0dp</dimen>
     <dimen name="workspace_bottom_padding">0dp</dimen>
     <dimen name="workspace_page_spacing">8dp</dimen>
-    <dimen name="dock_divider_padding_left">0dp</dimen>
-    <dimen name="dock_divider_padding_right">0dp</dimen>
-    <dimen name="dock_divider_padding_top">12dp</dimen>
-    <dimen name="dock_divider_padding_bottom">12dp</dimen>
+    <dimen name="workspace_divider_padding_left">0dp</dimen>
+    <dimen name="workspace_divider_padding_right">0dp</dimen>
+    <dimen name="workspace_divider_padding_top">12dp</dimen>
+    <dimen name="workspace_divider_padding_bottom">12dp</dimen>
 
 <!-- AppsCustomize -->
     <dimen name="apps_customize_cell_width">80dp</dimen>
diff --git a/res/values-large/styles.xml b/res/values-large/styles.xml
index bc21a3a..ea1a8e6 100644
--- a/res/values-large/styles.xml
+++ b/res/values-large/styles.xml
@@ -98,6 +98,8 @@
         <item name="android:layout_gravity">center</item>
         <item name="android:gravity">center_vertical</item>
         <item name="android:drawablePadding">7.5dp</item>
+        <item name="android:paddingLeft">25dp</item>
+        <item name="android:paddingRight">25dp</item>
         <item name="android:textColor">#FFFFFFFF</item>
         <item name="android:textSize">16sp</item>
         <item name="android:shadowColor">#393939</item>
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
index e917c50..2d27321 100644
--- a/res/values-port/dimens.xml
+++ b/res/values-port/dimens.xml
@@ -28,8 +28,8 @@
     <integer name="apps_customize_cellCountY">5</integer>
     <dimen name="apps_customize_pageLayoutWidthGap">-1dp</dimen>
     <dimen name="apps_customize_pageLayoutHeightGap">-1dp</dimen>
-    <dimen name="apps_customize_pageLayoutPaddingTop">15dp</dimen>
-    <dimen name="apps_customize_pageLayoutPaddingBottom">15dp</dimen>
+    <dimen name="apps_customize_pageLayoutPaddingTop">10dp</dimen>
+    <dimen name="apps_customize_pageLayoutPaddingBottom">10dp</dimen>
     <dimen name="apps_customize_pageLayoutPaddingLeft">5dp</dimen>
     <dimen name="apps_customize_pageLayoutPaddingRight">5dp</dimen>
 
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 215f698..f80b17c 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -24,10 +24,10 @@
     <dimen name="workspace_max_gap">8dp</dimen>
     <dimen name="folder_cell_width">74dp</dimen>
     <dimen name="folder_cell_height">80dp</dimen>
-    <dimen name="dock_divider_padding_left">12dp</dimen>
-    <dimen name="dock_divider_padding_right">12dp</dimen>
-    <dimen name="dock_divider_padding_top">0dp</dimen>
-    <dimen name="dock_divider_padding_bottom">0dp</dimen>
+    <dimen name="workspace_divider_padding_left">12dp</dimen>
+    <dimen name="workspace_divider_padding_right">12dp</dimen>
+    <dimen name="workspace_divider_padding_top">0dp</dimen>
+    <dimen name="workspace_divider_padding_bottom">0dp</dimen>
 
 <!-- QSB -->
     <dimen name="toolbar_button_vertical_padding">0dip</dimen>
@@ -53,7 +53,7 @@
     <dimen name="button_bar_height_plus_padding">88dp</dimen>
 
     <!-- Drag padding to add to the drop targets -->
-    <dimen name="drop_target_drag_padding">20dp</dimen>
+    <dimen name="drop_target_drag_padding">40dp</dimen>
 
     <!-- extra horizontal spacing between mini screen thumbnails ie. in all
          apps and in customization mode -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 62244a6..b356a42 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -66,15 +66,18 @@
 
     <style name="WorkspaceIcon.Portrait.AppsCustomize">
         <item name="android:background">@null</item>
+        <item name="android:paddingTop">0dp</item>
+        <item name="android:paddingBottom">0dp</item>
         <item name="android:paddingLeft">0dp</item>
         <item name="android:paddingRight">0dp</item>
-        <item name="android:drawablePadding">0dp</item>
+        <item name="android:drawablePadding">4dp</item>
         <item name="android:includeFontPadding">false</item>
     </style>
     <style name="WorkspaceIcon.Landscape.AppsCustomize">
         <item name="android:background">@null</item>
+        <item name="android:paddingTop">0dp</item>
         <item name="android:paddingBottom">0dp</item>
-        <item name="android:drawablePadding">0dp</item>
+        <item name="android:drawablePadding">2dp</item>
         <item name="android:includeFontPadding">false</item>
     </style>
 
@@ -105,6 +108,8 @@
         <item name="android:layout_gravity">center</item>
         <item name="android:gravity">center_vertical</item>
         <item name="android:drawablePadding">7.5dp</item>
+        <item name="android:paddingLeft">25dp</item>
+        <item name="android:paddingRight">25dp</item>
         <item name="android:textColor">#FFFFFFFF</item>
         <item name="android:textSize">16sp</item>
         <item name="android:shadowColor">#393939</item>
diff --git a/src/com/android/launcher2/ButtonDropTarget.java b/src/com/android/launcher2/ButtonDropTarget.java
index 138770a..868ede8 100644
--- a/src/com/android/launcher2/ButtonDropTarget.java
+++ b/src/com/android/launcher2/ButtonDropTarget.java
@@ -29,7 +29,7 @@
 /**
  * Implements a DropTarget.
  */
-public class ButtonDropTarget extends FrameLayout implements DropTarget, DragController.DragListener {
+public class ButtonDropTarget extends TextView implements DropTarget, DragController.DragListener {
 
     protected final int mTransitionDuration;
 
diff --git a/src/com/android/launcher2/DeleteDropTarget.java b/src/com/android/launcher2/DeleteDropTarget.java
index e76ab31..1553d3c 100644
--- a/src/com/android/launcher2/DeleteDropTarget.java
+++ b/src/com/android/launcher2/DeleteDropTarget.java
@@ -26,9 +26,8 @@
 import android.graphics.drawable.TransitionDrawable;
 import android.util.AttributeSet;
 import android.view.View;
-import android.view.animation.AccelerateInterpolator;
+import android.view.ViewGroup;
 import android.view.animation.DecelerateInterpolator;
-import android.widget.TextView;
 
 import com.android.launcher.R;
 
@@ -52,22 +51,21 @@
         super.onFinishInflate();
 
         // Get the drawable
-        mText = (TextView) findViewById(R.id.delete_target_text);
-        mOriginalTextColor = mText.getTextColors();
+        mOriginalTextColor = getTextColors();
 
         // Get the hover color
         Resources r = getResources();
         mHoverColor = r.getColor(R.color.delete_target_hover_tint);
         mHoverPaint.setColorFilter(new PorterDuffColorFilter(
                 mHoverColor, PorterDuff.Mode.SRC_ATOP));
-        mDrawable = (TransitionDrawable) mText.getCompoundDrawables()[0];
+        mDrawable = (TransitionDrawable) getCompoundDrawables()[0];
         mDrawable.setCrossFadeEnabled(true);
 
         // Remove the text in the Phone UI in landscape
         int orientation = getResources().getConfiguration().orientation;
         if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
             if (!LauncherApplication.isScreenLarge()) {
-                mText.setText("");
+                setText("");
             }
         }
     }
@@ -120,10 +118,10 @@
 
         mActive = isVisible;
         mDrawable.resetTransition();
-        mText.setTextColor(mOriginalTextColor);
-        setVisibility(isVisible ? View.VISIBLE : View.GONE);
-        if (mText.getText().length() > 0) {
-            mText.setText(isUninstall ? R.string.delete_target_uninstall_label
+        setTextColor(mOriginalTextColor);
+        ((ViewGroup) getParent()).setVisibility(isVisible ? View.VISIBLE : View.GONE);
+        if (getText().length() > 0) {
+            setText(isUninstall ? R.string.delete_target_uninstall_label
                 : R.string.delete_target_label);
         }
     }
@@ -138,7 +136,7 @@
         super.onDragEnter(d);
 
         mDrawable.startTransition(mTransitionDuration);
-        mText.setTextColor(mHoverColor);
+        setTextColor(mHoverColor);
     }
 
     public void onDragExit(DragObject d) {
@@ -146,7 +144,7 @@
 
         if (!d.dragComplete) {
             mDrawable.resetTransition();
-            mText.setTextColor(mOriginalTextColor);
+            setTextColor(mOriginalTextColor);
         }
     }
 
@@ -155,11 +153,12 @@
         Rect from = new Rect();
         Rect to = new Rect();
         dragLayer.getViewRectRelativeToSelf(d.dragView, from);
-        dragLayer.getViewRectRelativeToSelf(mText, to);
+        dragLayer.getViewRectRelativeToSelf(this, to);
 
         int width = mDrawable.getIntrinsicWidth();
         int height = mDrawable.getIntrinsicHeight();
-        to.set(to.left, to.top, to.left + width, to.bottom);
+        to.set(to.left + getPaddingLeft(), to.top + getPaddingTop(),
+                to.left + getPaddingLeft() + width, to.bottom);
 
         // Center the destination rect about the trash icon
         int xOffset = (int) -(d.dragView.getMeasuredWidth() - width) / 2;
diff --git a/src/com/android/launcher2/InfoDropTarget.java b/src/com/android/launcher2/InfoDropTarget.java
index 3507181..dba845b 100644
--- a/src/com/android/launcher2/InfoDropTarget.java
+++ b/src/com/android/launcher2/InfoDropTarget.java
@@ -26,7 +26,7 @@
 import android.graphics.drawable.TransitionDrawable;
 import android.util.AttributeSet;
 import android.view.View;
-import android.widget.TextView;
+import android.view.ViewGroup;
 
 import com.android.launcher.R;
 
@@ -48,22 +48,21 @@
     protected void onFinishInflate() {
         super.onFinishInflate();
 
-        mText = (TextView) findViewById(R.id.info_target_text);
-        mOriginalTextColor = mText.getTextColors();
+        mOriginalTextColor = getTextColors();
 
         // Get the hover color
         Resources r = getResources();
         mHoverColor = r.getColor(R.color.info_target_hover_tint);
         mHoverPaint.setColorFilter(new PorterDuffColorFilter(
                 mHoverColor, PorterDuff.Mode.SRC_ATOP));
-        mDrawable = (TransitionDrawable) mText.getCompoundDrawables()[0];
+        mDrawable = (TransitionDrawable) getCompoundDrawables()[0];
         mDrawable.setCrossFadeEnabled(true);
 
         // Remove the text in the Phone UI in landscape
         int orientation = getResources().getConfiguration().orientation;
         if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
             if (!LauncherApplication.isScreenLarge()) {
-                mText.setText("");
+                setText("");
             }
         }
     }
@@ -100,8 +99,8 @@
 
         mActive = isVisible;
         mDrawable.resetTransition();
-        mText.setTextColor(mOriginalTextColor);
-        setVisibility(isVisible ? View.VISIBLE : View.GONE);
+        setTextColor(mOriginalTextColor);
+        ((ViewGroup) getParent()).setVisibility(isVisible ? View.VISIBLE : View.GONE);
     }
 
     @Override
@@ -114,7 +113,7 @@
         super.onDragEnter(d);
 
         mDrawable.startTransition(mTransitionDuration);
-        mText.setTextColor(mHoverColor);
+        setTextColor(mHoverColor);
     }
 
     public void onDragExit(DragObject d) {
@@ -122,7 +121,7 @@
 
         if (!d.dragComplete) {
             mDrawable.resetTransition();
-            mText.setTextColor(mOriginalTextColor);
+            setTextColor(mOriginalTextColor);
         }
     }
 }
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 596ef50..292ccd7 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -163,14 +163,13 @@
 
     // Scrolling indicator
     private ValueAnimator mScrollIndicatorAnimator;
-    private android.animation.ValueAnimator mDockDividerAnimator;
     private ImageView mScrollIndicator;
     private int mScrollIndicatorPaddingLeft;
     private int mScrollIndicatorPaddingRight;
     private boolean mHasScrollIndicator = true;
-    private static final int sScrollIndicatorFadeInDuration = 150;
-    private static final int sScrollIndicatorFadeOutDuration = 650;
-    private static final int sScrollIndicatorFlashDuration = 650;
+    protected static final int sScrollIndicatorFadeInDuration = 150;
+    protected static final int sScrollIndicatorFadeOutDuration = 650;
+    protected static final int sScrollIndicatorFlashDuration = 650;
 
     // If set, will defer loading associated pages until the scrolling settles
     private boolean mDeferLoadAssociatedPagesUntilScrollCompletes;
@@ -1740,55 +1739,6 @@
         }
     }
 
-    void showDockDivider(boolean immediately) {
-        final ViewGroup parent = (ViewGroup) getParent();
-        final View divider = (ImageView) (parent.findViewById(R.id.dock_divider));
-        if (divider != null) {
-            divider.setVisibility(View.VISIBLE);
-            if (mDockDividerAnimator != null) {
-                mDockDividerAnimator.cancel();
-            }
-            if (immediately) {
-                divider.setAlpha(1f);
-            } else {
-                mDockDividerAnimator = ObjectAnimator.ofFloat(divider, "alpha", 1f);
-                mDockDividerAnimator.setDuration(sScrollIndicatorFadeInDuration);
-                mDockDividerAnimator.start();
-            }
-        }
-    }
-
-    void hideDockDivider(boolean immediately) {
-        final ViewGroup parent = (ViewGroup) getParent();
-        final View divider = (ImageView) (parent.findViewById(R.id.dock_divider));
-        if (divider != null) {
-            if (mDockDividerAnimator != null) {
-                mDockDividerAnimator.cancel();
-            }
-            if (immediately) {
-                divider.setVisibility(View.GONE);
-                divider.setAlpha(0f);
-            } else {
-                mDockDividerAnimator = ObjectAnimator.ofFloat(divider, "alpha", 0f);
-                mDockDividerAnimator.setDuration(sScrollIndicatorFadeOutDuration);
-                mDockDividerAnimator.addListener(new AnimatorListenerAdapter() {
-                    private boolean cancelled = false;
-                    @Override
-                    public void onAnimationCancel(android.animation.Animator animation) {
-                        cancelled = true;
-                    }
-                    @Override
-                    public void onAnimationEnd(android.animation.Animator animation) {
-                        if (!cancelled) {
-                            divider.setVisibility(View.GONE);
-                        }
-                    }
-                });
-                mDockDividerAnimator.start();
-            }
-        }
-    }
-
     /**
      * To be overridden by subclasses to determine whether the scroll indicator should stretch to
      * fill its space on the track or not.
diff --git a/src/com/android/launcher2/SearchDropTargetBar.java b/src/com/android/launcher2/SearchDropTargetBar.java
index ee3ab18..69a1213 100644
--- a/src/com/android/launcher2/SearchDropTargetBar.java
+++ b/src/com/android/launcher2/SearchDropTargetBar.java
@@ -77,8 +77,8 @@
         // Get the individual components
         mQSBSearchBar = findViewById(R.id.qsb_search_bar);
         mDropTargetBar = findViewById(R.id.drag_target_bar);
-        mInfoDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.info_target);
-        mDeleteDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.delete_target);
+        mInfoDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.info_target_text);
+        mDeleteDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.delete_target_text);
         mBarHeight = getResources().getDimensionPixelSize(R.dimen.qsb_bar_height);
 
         mInfoDropTarget.setSearchDropTargetBar(this);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 23b8c2d..e4865c2 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -58,6 +58,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.DecelerateInterpolator;
+import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -109,6 +110,7 @@
     private float mBackgroundAlpha = 0;
     private float mOverScrollMaxBackgroundAlpha = 0.0f;
     private int mOverScrollPageIndex = -1;
+    private AnimatorSet mDividerAnimator;
 
     private final WallpaperManager mWallpaperManager;
     private IBinder mWindowToken;
@@ -3542,4 +3544,66 @@
     protected boolean hasElasticScrollIndicator() {
         return true;
     }
+
+    void showDockDivider(boolean immediately) {
+        final ViewGroup parent = (ViewGroup) getParent();
+        final View qsbDivider = (ImageView) (parent.findViewById(R.id.qsb_divider));
+        final View dockDivider = (ImageView) (parent.findViewById(R.id.dock_divider));
+        if (qsbDivider != null && dockDivider != null) {
+            qsbDivider.setVisibility(View.VISIBLE);
+            dockDivider.setVisibility(View.VISIBLE);
+            if (mDividerAnimator != null) {
+                mDividerAnimator.cancel();
+                mDividerAnimator = null;
+            }
+            if (immediately) {
+                qsbDivider.setAlpha(1f);
+                dockDivider.setAlpha(1f);
+            } else {
+                mDividerAnimator = new AnimatorSet();
+                mDividerAnimator.playTogether(ObjectAnimator.ofFloat(qsbDivider, "alpha", 1f),
+                        ObjectAnimator.ofFloat(dockDivider, "alpha", 1f));
+                mDividerAnimator.setDuration(sScrollIndicatorFadeInDuration);
+                mDividerAnimator.start();
+            }
+        }
+    }
+
+    void hideDockDivider(boolean immediately) {
+        final ViewGroup parent = (ViewGroup) getParent();
+        final View qsbDivider = (ImageView) (parent.findViewById(R.id.qsb_divider));
+        final View dockDivider = (ImageView) (parent.findViewById(R.id.dock_divider));
+        if (qsbDivider != null && dockDivider != null) {
+            if (mDividerAnimator != null) {
+                mDividerAnimator.cancel();
+                mDividerAnimator = null;
+            }
+            if (immediately) {
+                qsbDivider.setVisibility(View.GONE);
+                dockDivider.setVisibility(View.GONE);
+                qsbDivider.setAlpha(0f);
+                dockDivider.setAlpha(0f);
+            } else {
+                mDividerAnimator = new AnimatorSet();
+                mDividerAnimator.playTogether(ObjectAnimator.ofFloat(qsbDivider, "alpha", 0f),
+                        ObjectAnimator.ofFloat(dockDivider, "alpha", 0f));
+                mDividerAnimator.addListener(new AnimatorListenerAdapter() {
+                    private boolean cancelled = false;
+                    @Override
+                    public void onAnimationCancel(android.animation.Animator animation) {
+                        cancelled = true;
+                    }
+                    @Override
+                    public void onAnimationEnd(android.animation.Animator animation) {
+                        if (!cancelled) {
+                            qsbDivider.setVisibility(View.GONE);
+                            dockDivider.setVisibility(View.GONE);
+                        }
+                    }
+                });
+                mDividerAnimator.setDuration(sScrollIndicatorFadeOutDuration);
+                mDividerAnimator.start();
+            }
+        }
+    }
 }