summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-06-16 13:35:04 -0700
committerWinson Chung <winsonc@google.com>2015-06-23 14:24:15 -0700
commitb1777447d9b9700b48f8060f8b318f2363c43e8d (patch)
treea5b94ed9b83316765b73265b4c030e40ed0bf4c9 /res
parente5106b687f6978bb8bb11ec90d7e8924a1b9e795 (diff)
downloadandroid_packages_apps_Trebuchet-b1777447d9b9700b48f8060f8b318f2363c43e8d.tar.gz
android_packages_apps_Trebuchet-b1777447d9b9700b48f8060f8b318f2363c43e8d.tar.bz2
android_packages_apps_Trebuchet-b1777447d9b9700b48f8060f8b318f2363c43e8d.zip
Refactoring fast scroller.
- Fixing issue with fast scroller not fitting name width. - Refactoring fast scrolling/scroll bar code out of base recycler view - Adding animations to fast scroller to match design - Smooth scrolling when jumping between app rows - Fixing issue with fast scroller jumping when you first pick it up - Fixing issue with wrong background paddings being used Bug: 21874346 Bug: 22031923 Change-Id: I9f011b1f375751f437604b900e95a2942d3f4601
Diffstat (limited to 'res')
-rw-r--r--res/drawable-ldrtl/all_apps_fastscroll_bg.xml2
-rw-r--r--res/drawable/all_apps_scrollbar_thumb.xml21
-rw-r--r--res/drawable/container_fastscroll_popup_bg.xml (renamed from res/drawable/all_apps_fastscroll_bg.xml)2
-rw-r--r--res/layout/all_apps_container.xml4
-rw-r--r--res/layout/all_apps_search_bar.xml4
-rw-r--r--res/values-sw720dp/dimens.xml2
-rw-r--r--res/values/colors.xml6
-rw-r--r--res/values/dimens.xml24
8 files changed, 25 insertions, 40 deletions
diff --git a/res/drawable-ldrtl/all_apps_fastscroll_bg.xml b/res/drawable-ldrtl/all_apps_fastscroll_bg.xml
index 4777f70bb..d79096807 100644
--- a/res/drawable-ldrtl/all_apps_fastscroll_bg.xml
+++ b/res/drawable-ldrtl/all_apps_fastscroll_bg.xml
@@ -16,7 +16,7 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/all_apps_scrollbar_thumb_color" />
+ <solid android:color="@color/container_fastscroll_thumb_active_color" />
<size
android:width="64dp"
android:height="64dp" />
diff --git a/res/drawable/all_apps_scrollbar_thumb.xml b/res/drawable/all_apps_scrollbar_thumb.xml
deleted file mode 100644
index 649a963b1..000000000
--- a/res/drawable/all_apps_scrollbar_thumb.xml
+++ /dev/null
@@ -1,21 +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="@color/all_apps_scrollbar_thumb_color" />
- <size android:width="@dimen/all_apps_fast_scroll_bar_width" />
-</shape> \ No newline at end of file
diff --git a/res/drawable/all_apps_fastscroll_bg.xml b/res/drawable/container_fastscroll_popup_bg.xml
index 6b7448459..2ef07ab96 100644
--- a/res/drawable/all_apps_fastscroll_bg.xml
+++ b/res/drawable/container_fastscroll_popup_bg.xml
@@ -16,7 +16,7 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/all_apps_scrollbar_thumb_color" />
+ <solid android:color="@color/container_fastscroll_thumb_active_color" />
<size
android:width="64dp"
android:height="64dp" />
diff --git a/res/layout/all_apps_container.xml b/res/layout/all_apps_container.xml
index 1de82019c..0b624e6a5 100644
--- a/res/layout/all_apps_container.xml
+++ b/res/layout/all_apps_container.xml
@@ -38,8 +38,8 @@
android:id="@+id/prediction_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/all_apps_prediction_bar_top_bottom_padding"
- android:paddingBottom="@dimen/all_apps_prediction_bar_top_bottom_padding"
+ android:paddingTop="@dimen/all_apps_prediction_bar_top_padding"
+ android:paddingBottom="@dimen/all_apps_prediction_bar_bottom_padding"
android:orientation="horizontal"
android:focusable="true"
android:descendantFocusability="afterDescendants"
diff --git a/res/layout/all_apps_search_bar.xml b/res/layout/all_apps_search_bar.xml
index 8d75b15a6..cf30eac36 100644
--- a/res/layout/all_apps_search_bar.xml
+++ b/res/layout/all_apps_search_bar.xml
@@ -63,8 +63,8 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/all_apps_search_bar_height"
android:layout_gravity="end|center_vertical"
- android:layout_marginEnd="6dp"
- android:layout_marginRight="6dp"
+ android:layout_marginEnd="4dp"
+ android:layout_marginRight="4dp"
android:contentDescription="@string/all_apps_search_bar_hint"
android:paddingBottom="13dp"
android:paddingTop="13dp"
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 9d1e3529c..d48f9eed0 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -17,7 +17,7 @@
<resources>
<!-- All Apps -->
<dimen name="all_apps_search_bar_height">54dp</dimen>
- <dimen name="all_apps_icon_top_bottom_padding">16dp</dimen>
+ <dimen name="all_apps_icon_top_bottom_padding">14dp</dimen>
<!-- QSB -->
<dimen name="toolbar_button_vertical_padding">8dip</dimen>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 7d36101ef..5afc5b98d 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -39,11 +39,15 @@
<color name="outline_color">#FFFFFFFF</color>
<color name="widget_text_panel">#FF374248</color>
+ <!-- Containers -->
+ <color name="container_fastscroll_thumb_inactive_color">#42000000</color>
+ <color name="container_fastscroll_thumb_active_color">#009688</color>
+
<!-- All Apps -->
- <color name="all_apps_scrollbar_thumb_color">#009688</color>
<color name="all_apps_grid_section_text_color">#009688</color>
<!-- Widgets view -->
+ <color name="widgets_view_fastscroll_thumb_inactive_color">#42FFFFFF</color>
<color name="widgets_view_section_text_color">#FFFFFF</color>
<color name="widgets_view_item_text_color">#C4C4C4</color>
<color name="widgets_cell_color">#263238</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index da56d9049..122b831b4 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -49,12 +49,20 @@
<dimen name="toolbar_button_vertical_padding">4dip</dimen>
<dimen name="toolbar_button_horizontal_padding">12dip</dimen>
-<!-- All Apps -->
+<!-- Container -->
<!-- Note: This needs to match the fixed insets for the search box. -->
<dimen name="container_bounds_inset">8dp</dimen>
<!-- Notes: container_bounds_inset - quantum_panel_outer_padding -->
<dimen name="container_bounds_minus_quantum_panel_padding_inset">4dp</dimen>
+ <dimen name="container_fastscroll_thumb_min_width">4dp</dimen>
+ <dimen name="container_fastscroll_thumb_max_width">8dp</dimen>
+ <dimen name="container_fastscroll_thumb_height">64dp</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>
+
+<!-- All Apps -->
<dimen name="all_apps_grid_view_start_margin">0dp</dimen>
<dimen name="all_apps_grid_section_y_offset">8dp</dimen>
<dimen name="all_apps_grid_section_text_size">24sp</dimen>
@@ -62,16 +70,10 @@
<dimen name="all_apps_search_bar_prediction_bar_padding">8dp</dimen>
<dimen name="all_apps_icon_top_bottom_padding">8dp</dimen>
<dimen name="all_apps_icon_width_gap">24dp</dimen>
- <dimen name="all_apps_prediction_bar_top_bottom_padding">16dp</dimen>
-
- <dimen name="all_apps_fast_scroll_bar_width">4dp</dimen>
- <dimen name="all_apps_fast_scroll_scrubber_touch_inset">-24dp</dimen>
- <dimen name="all_apps_fast_scroll_popup_size">72dp</dimen>
- <dimen name="all_apps_fast_scroll_text_size">48dp</dimen>
-
- <dimen name="all_apps_header_max_elevation">4dp</dimen>
- <dimen name="all_apps_header_scroll_to_elevation">16dp</dimen>
- <dimen name="all_apps_header_shadow_height">6dp</dimen>
+ <!-- The top padding should account for the general all_apps_list_top_bottom_padding -->
+ <dimen name="all_apps_prediction_bar_top_padding">0dp</dimen>
+ <dimen name="all_apps_prediction_bar_bottom_padding">16dp</dimen>
+ <dimen name="all_apps_list_top_bottom_padding">8dp</dimen>
<!-- Widget tray -->
<dimen name="widget_container_inset">8dp</dimen>