diff options
| author | 2016-10-20 21:54:11 +0000 | |
|---|---|---|
| committer | 2016-10-20 21:54:11 +0000 | |
| commit | 9f47d20e57eee96ac0495c2bf6d4c84c9a154306 (patch) | |
| tree | 34deb877c8fabdaa9a8a3f62a959ee9971c13ec1 | |
| parent | 30678ec096f528830dbb7723a5ce35bffa45edc2 (diff) | |
| parent | 78a340f2b6e008fd4efe092b0ef1f3d944de72b9 (diff) | |
Add custom scrollbars to the default device theme
am: 78a340f2b6
Change-Id: I67f5e74259b5fa16bd647e7b7796d34a798ee175
| -rw-r--r-- | core/res/res/drawable-watch/scrollbar_vertical_thumb.xml | 23 | ||||
| -rw-r--r-- | core/res/res/drawable-watch/scrollbar_vertical_track.xml | 21 | ||||
| -rw-r--r-- | core/res/res/values-watch/config_material.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/config_material.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/themes_material.xml | 8 | 
5 files changed, 56 insertions, 4 deletions
diff --git a/core/res/res/drawable-watch/scrollbar_vertical_thumb.xml b/core/res/res/drawable-watch/scrollbar_vertical_thumb.xml new file mode 100644 index 000000000000..51aced25e619 --- /dev/null +++ b/core/res/res/drawable-watch/scrollbar_vertical_thumb.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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:tint="?attr/colorControlNormal" +    android:shape="rectangle"> +    <solid android:color="#39757575" /> +    <size android:height="10dp" /> +    <corners android:radius="2dp" /> +</shape> diff --git a/core/res/res/drawable-watch/scrollbar_vertical_track.xml b/core/res/res/drawable-watch/scrollbar_vertical_track.xml new file mode 100644 index 000000000000..5a04b1ca0b2c --- /dev/null +++ b/core/res/res/drawable-watch/scrollbar_vertical_track.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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:tint="?attr/colorControlNormal" +    android:shape="rectangle"> +    <solid android:color="#39ffffff" /> +    <size android:width="4dp" /> +</shape> diff --git a/core/res/res/values-watch/config_material.xml b/core/res/res/values-watch/config_material.xml index 104d122e01d3..529f18b78e4d 100644 --- a/core/res/res/values-watch/config_material.xml +++ b/core/res/res/values-watch/config_material.xml @@ -29,4 +29,8 @@      <!-- Always overscan by default to ensure onApplyWindowInsets will always be called. -->      <bool name="config_windowOverscanByDefault">true</bool> + +    <!-- Style the scrollbars accoridngly. --> +    <drawable name="config_scrollbarThumbVertical">@drawable/scrollbar_vertical_thumb</drawable> +    <drawable name="config_scrollbarTrackVertical">@drawable/scrollbar_vertical_track</drawable>  </resources> diff --git a/core/res/res/values/config_material.xml b/core/res/res/values/config_material.xml index 29494db40557..840a551f914f 100644 --- a/core/res/res/values/config_material.xml +++ b/core/res/res/values/config_material.xml @@ -37,4 +37,8 @@      <!-- The amount to offset when scrolling to a selection in an AlertDialog -->      <dimen name="config_alertDialogSelectionScrollOffset">0dp</dimen> + +    <!-- Style the scrollbars accoridngly. --> +    <drawable name="config_scrollbarThumbVertical">@drawable/scrollbar_handle_material</drawable> +    <drawable name="config_scrollbarTrackVertical">@null</drawable>  </resources> diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml index 0eb4c8d86928..ff8693bbbdad 100644 --- a/core/res/res/values/themes_material.xml +++ b/core/res/res/values/themes_material.xml @@ -212,9 +212,9 @@ please see themes_device_defaults.xml.          <item name="scrollbarDefaultDelayBeforeFade">400</item>          <item name="scrollbarSize">10dp</item>          <item name="scrollbarThumbHorizontal">@drawable/scrollbar_handle_material</item> -        <item name="scrollbarThumbVertical">@drawable/scrollbar_handle_material</item> +        <item name="scrollbarThumbVertical">@drawable/config_scrollbarThumbVertical</item>          <item name="scrollbarTrackHorizontal">@null</item> -        <item name="scrollbarTrackVertical">@null</item> +        <item name="scrollbarTrackVertical">@drawable/config_scrollbarTrackVertical</item>          <!-- Text selection handle attributes -->          <item name="textSelectHandleLeft">@drawable/text_select_handle_left_material</item> @@ -573,9 +573,9 @@ please see themes_device_defaults.xml.          <item name="scrollbarDefaultDelayBeforeFade">400</item>          <item name="scrollbarSize">10dp</item>          <item name="scrollbarThumbHorizontal">@drawable/scrollbar_handle_material</item> -        <item name="scrollbarThumbVertical">@drawable/scrollbar_handle_material</item> +        <item name="scrollbarThumbVertical">@drawable/config_scrollbarThumbVertical</item>          <item name="scrollbarTrackHorizontal">@null</item> -        <item name="scrollbarTrackVertical">@null</item> +        <item name="scrollbarTrackVertical">@drawable/config_scrollbarTrackVertical</item>          <!-- Text selection handle attributes -->          <item name="textSelectHandleLeft">@drawable/text_select_handle_left_material</item>  |