Updating the fast scroll bar UI

Bug: 37015359
Change-Id: Iec0748f04ebe9a3eef13ff759da3cab6ff28c3a1
diff --git a/res/drawable-ldrtl/container_fastscroll_popup_bg.xml b/res/drawable-ldrtl/container_fastscroll_popup_bg.xml
deleted file mode 100644
index 2bbf5cd..0000000
--- a/res/drawable-ldrtl/container_fastscroll_popup_bg.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
-    <solid android:color="?android:attr/colorAccent" />
-    <size
-        android:width="64dp"
-        android:height="64dp" />
-    <corners
-        android:topLeftRadius="64dp"
-        android:topRightRadius="64dp"
-        android:bottomRightRadius="64dp" />
-</shape>
\ No newline at end of file
diff --git a/res/drawable/container_fastscroll_popup_bg.xml b/res/drawable/container_fastscroll_popup_bg.xml
deleted file mode 100644
index 3dc7680..0000000
--- a/res/drawable/container_fastscroll_popup_bg.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
-    <solid android:color="?android:attr/colorAccent" />
-    <size
-        android:width="64dp"
-        android:height="64dp" />
-    <corners
-        android:topLeftRadius="64dp"
-        android:topRightRadius="64dp"
-        android:bottomLeftRadius="64dp" />
-</shape>
\ No newline at end of file
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 09b9655..ff605f4 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -54,8 +54,8 @@
             android:overScrollMode="never"
             android:descendantFocusability="afterDescendants"
             android:focusable="true"
-            android:paddingStart="@dimen/container_fastscroll_thumb_max_width"
-            android:paddingEnd="@dimen/container_fastscroll_thumb_max_width" />
+            android:paddingStart="@dimen/dynamic_grid_edge_margin"
+            android:paddingEnd="@dimen/dynamic_grid_edge_margin" />
 
         <!-- Fast scroller popup -->
         <TextView
@@ -63,7 +63,7 @@
             android:layout_alignTop="@+id/apps_list_view"
             android:id="@+id/fast_scroller_popup"
             android:layout_alignParentEnd="true"
-            android:layout_marginEnd="@dimen/container_fastscroll_popup_margin" />
+            android:layout_marginEnd="@dimen/fastscroll_popup_margin" />
 
         <!-- Note: we are reusing/repurposing a system attribute for search layout, because of a
          platform bug, which prevents using custom attributes in <include> tag -->
diff --git a/res/layout/all_apps_discovery_item.xml b/res/layout/all_apps_discovery_item.xml
index fb1755c..728283f 100644
--- a/res/layout/all_apps_discovery_item.xml
+++ b/res/layout/all_apps_discovery_item.xml
@@ -94,8 +94,8 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
-        android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
-        android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+        android:paddingLeft="@dimen/dynamic_grid_edge_margin"
+        android:paddingRight="@dimen/dynamic_grid_edge_margin"
         android:src="@drawable/all_apps_divider"
         android:scaleType="fitXY"
         android:focusable="false" />
diff --git a/res/layout/all_apps_discovery_loading_divider.xml b/res/layout/all_apps_discovery_loading_divider.xml
index 1ad5521..005847c 100644
--- a/res/layout/all_apps_discovery_loading_divider.xml
+++ b/res/layout/all_apps_discovery_loading_divider.xml
@@ -16,8 +16,8 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="6dp"
-    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
-    android:paddingRight="@dimen/container_fastscroll_thumb_max_width">
+    android:paddingLeft="@dimen/dynamic_grid_edge_margin"
+    android:paddingRight="@dimen/dynamic_grid_edge_margin">
 
     <ProgressBar
         android:id="@+id/loadingProgressBar"
diff --git a/res/layout/all_apps_divider.xml b/res/layout/all_apps_divider.xml
index 1eaf685..8a4f646 100644
--- a/res/layout/all_apps_divider.xml
+++ b/res/layout/all_apps_divider.xml
@@ -19,8 +19,8 @@
     android:layout_height="wrap_content"
     android:paddingTop="@dimen/all_apps_divider_margin_vertical"
     android:paddingBottom="@dimen/all_apps_divider_margin_vertical"
-    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
-    android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+    android:paddingLeft="@dimen/dynamic_grid_edge_margin"
+    android:paddingRight="@dimen/dynamic_grid_edge_margin"
     android:src="@drawable/all_apps_divider"
     android:scaleType="fitXY"
     android:focusable="false" />
\ No newline at end of file
diff --git a/res/layout/all_apps_search_divider.xml b/res/layout/all_apps_search_divider.xml
index d2ef691..c052c66 100644
--- a/res/layout/all_apps_search_divider.xml
+++ b/res/layout/all_apps_search_divider.xml
@@ -18,8 +18,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:paddingBottom="@dimen/all_apps_divider_margin_vertical"
-    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
-    android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+    android:paddingLeft="@dimen/dynamic_grid_edge_margin"
+    android:paddingRight="@dimen/dynamic_grid_edge_margin"
     android:src="@drawable/all_apps_search_divider"
     android:scaleType="fitXY"
     android:focusable="false" />
\ No newline at end of file
diff --git a/res/layout/all_apps_search_market.xml b/res/layout/all_apps_search_market.xml
index 3f19b25..6f2dd3d 100644
--- a/res/layout/all_apps_search_market.xml
+++ b/res/layout/all_apps_search_market.xml
@@ -19,8 +19,8 @@
     android:layout_width="match_parent"
     android:layout_height="48dp"
     android:gravity="center"
-    android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
-    android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+    android:paddingLeft="@dimen/dynamic_grid_edge_margin"
+    android:paddingRight="@dimen/dynamic_grid_edge_margin"
     android:fontFamily="sans-serif-medium"
     android:textSize="14sp"
     android:textColor="?android:attr/colorAccent"
diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml
index 476901d..47b0683 100644
--- a/res/layout/widgets_view.xml
+++ b/res/layout/widgets_view.xml
@@ -53,7 +53,7 @@
             style="@style/FastScrollerPopup"
             android:id="@+id/fast_scroller_popup"
             android:layout_gravity="top|end"
-            android:layout_marginEnd="@dimen/container_fastscroll_popup_margin" />
+            android:layout_marginEnd="@dimen/fastscroll_popup_margin" />
 
         <ProgressBar
             android:layout_width="wrap_content"
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 3915759..b40aa14 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,6 +15,13 @@
 -->
 
 <resources>
-<!-- Container -->
-     <item name="container_margin" format="fraction" type="fraction">12%</item>
+    <!-- Container -->
+    <item name="container_margin" format="fraction" type="fraction">12%</item>
+
+    <!-- Fast scroll -->
+    <dimen name="fastscroll_popup_width">58dp</dimen>
+    <dimen name="fastscroll_popup_height">48dp</dimen>
+    <dimen name="fastscroll_popup_padding">10dp</dimen>
+    <dimen name="fastscroll_popup_text_size">24dp</dimen>
+
 </resources>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 358d9b6..e836d7d 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -15,10 +15,16 @@
 -->
 
 <resources>
-<!-- All Apps -->
+    <!-- All Apps -->
     <dimen name="all_apps_button_scale_down">8dp</dimen>
     <dimen name="all_apps_search_bar_height">54dp</dimen>
     <dimen name="all_apps_empty_search_message_top_offset">64dp</dimen>
     <dimen name="all_apps_empty_search_bg_top_offset">180dp</dimen>
 
+    <!-- Fast scroll -->
+    <dimen name="fastscroll_popup_width">75dp</dimen>
+    <dimen name="fastscroll_popup_height">62dp</dimen>
+    <dimen name="fastscroll_popup_padding">13dp</dimen>
+    <dimen name="fastscroll_popup_text_size">32dp</dimen>
+
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 3a531b0..57b4be4 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -47,14 +47,18 @@
     <dimen name="widget_handle_margin">13dp</dimen>
     <dimen name="resize_frame_background_padding">24dp</dimen>
 
-<!-- Container -->
-    <dimen name="container_fastscroll_thumb_min_width">5dp</dimen>
-    <dimen name="container_fastscroll_thumb_max_width">9dp</dimen>
-    <dimen name="container_fastscroll_popup_margin">18dp</dimen>
-    <dimen name="container_fastscroll_thumb_height">72dp</dimen>
-    <dimen name="container_fastscroll_thumb_touch_inset">-24dp</dimen>
-    <dimen name="container_fastscroll_popup_size">72dp</dimen>
-    <dimen name="container_fastscroll_popup_text_size">48dp</dimen>
+<!-- Fast scroll -->
+    <dimen name="fastscroll_track_min_width">6dp</dimen>
+    <dimen name="fastscroll_track_max_width">8dp</dimen>
+    <dimen name="fastscroll_thumb_padding">1dp</dimen>
+    <dimen name="fastscroll_thumb_height">52dp</dimen>
+    <dimen name="fastscroll_thumb_touch_inset">-24dp</dimen>
+
+    <dimen name="fastscroll_popup_width">75dp</dimen>
+    <dimen name="fastscroll_popup_height">62dp</dimen>
+    <dimen name="fastscroll_popup_padding">13dp</dimen>
+    <dimen name="fastscroll_popup_text_size">32dp</dimen>
+    <dimen name="fastscroll_popup_margin">19dp</dimen>
 
 <!-- All Apps -->
     <dimen name="all_apps_button_scale_down">0dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8af6968..594c7db 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -86,11 +86,11 @@
     </style>
 
     <style name="FastScrollerPopup" >
-        <item name="android:background">@drawable/container_fastscroll_popup_bg</item>
         <item name="android:layout_width">wrap_content</item>
-        <item name="android:minWidth">@dimen/container_fastscroll_popup_size</item>
-        <item name="android:layout_height">@dimen/container_fastscroll_popup_size</item>
-        <item name="android:textSize">@dimen/container_fastscroll_popup_text_size</item>
+        <item name="android:minWidth">@dimen/fastscroll_popup_width</item>
+        <item name="android:layout_height">@dimen/fastscroll_popup_height</item>
+        <item name="android:textSize">@dimen/fastscroll_popup_text_size</item>
+        <item name="android:paddingEnd">@dimen/fastscroll_popup_padding</item>
         <item name="android:gravity">center</item>
         <item name="android:alpha">0</item>
         <item name="android:elevation">3dp</item>