diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 5d01b4162c6f5..f16fcc933b707 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 = 10; + private static final int SCROLL_BAR_SIZE = 4; /** * Duration of the fade when scrollbars fade away in milliseconds @@ -346,7 +346,8 @@ public class ViewConfiguration { mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f); mFadingEdgeLength = (int) (sizeAndDensity * FADING_EDGE_LENGTH + 0.5f); - mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); + mScrollbarSize = res.getDimensionPixelSize( + com.android.internal.R.dimen.config_scrollbarSize); 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 33efbbac86903..f020112d1329c 100644 --- a/core/res/res/drawable/scrollbar_handle_material.xml +++ b/core/res/res/drawable/scrollbar_handle_material.xml @@ -19,7 +19,4 @@ android:shape="rectangle"> - diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index fcb0e08141e4f..94d3ef36ee0f5 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1873,6 +1873,10 @@ 500 + + 4dp + 64dp diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 0d63a1e484206..8e22805842f4c 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -428,6 +428,7 @@ + diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml index b063baf386f4d..400fb47ba9e39 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 - 10dp + @dimen/config_scrollbarSize @drawable/scrollbar_handle_material @drawable/config_scrollbarThumbVertical @null @@ -583,7 +583,7 @@ please see themes_device_defaults.xml. 250 400 - 10dp + @dimen/config_scrollbarSize @drawable/scrollbar_handle_material @drawable/config_scrollbarThumbVertical @null