From f619ead8d3cf479c965f10ad94960cacbcd7fc3d Mon Sep 17 00:00:00 2001 From: Vladislav Kaznacheev Date: Wed, 12 Apr 2017 18:01:36 +0000 Subject: [PATCH] Revert "Make scrollbarSize in Material Design theme configurable" This reverts commit 98329f4da372e2ab00565b88df785620856cfb65. Bug: 35432058 Test: android.view.cts.ViewTest passes Change-Id: I4c76450a47b581a8237108180806845f5f66ac39 --- core/java/android/view/ViewConfiguration.java | 5 ++--- core/res/res/drawable/scrollbar_handle_material.xml | 3 +++ core/res/res/values/config.xml | 4 ---- core/res/res/values/symbols.xml | 1 - core/res/res/values/themes_material.xml | 4 ++-- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 574137b30f1ee..4def0d02c2259 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -35,7 +35,7 @@ public class ViewConfiguration { * Defines the width of the horizontal scrollbar and the height of the vertical scrollbar in * dips */ - private static final int SCROLL_BAR_SIZE = 4; + private static final int SCROLL_BAR_SIZE = 10; /** * Duration of the fade when scrollbars fade away in milliseconds @@ -354,8 +354,7 @@ public class ViewConfiguration { mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f); mFadingEdgeLength = (int) (sizeAndDensity * FADING_EDGE_LENGTH + 0.5f); - mScrollbarSize = res.getDimensionPixelSize( - com.android.internal.R.dimen.config_scrollbarSize); + mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); diff --git a/core/res/res/drawable/scrollbar_handle_material.xml b/core/res/res/drawable/scrollbar_handle_material.xml index f020112d1329c..33efbbac86903 100644 --- a/core/res/res/drawable/scrollbar_handle_material.xml +++ b/core/res/res/drawable/scrollbar_handle_material.xml @@ -19,4 +19,7 @@ android:shape="rectangle"> + diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 3dd7ad415bafe..e1bcd70f6bf23 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1881,10 +1881,6 @@ 500 - - 4dp - 64dp diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 7cb9ba8cd64b3..94918c4dc33ec 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -434,7 +434,6 @@ - diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml index 9dafa7a02849d..86abe9782c096 100644 --- a/core/res/res/values/themes_material.xml +++ b/core/res/res/values/themes_material.xml @@ -214,7 +214,7 @@ please see themes_device_defaults.xml. 250 400 - @dimen/config_scrollbarSize + 10dp @drawable/scrollbar_handle_material @drawable/config_scrollbarThumbVertical @null @@ -582,7 +582,7 @@ please see themes_device_defaults.xml. 250 400 - @dimen/config_scrollbarSize + 10dp @drawable/scrollbar_handle_material @drawable/config_scrollbarThumbVertical @null