Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe09e358 authored by Mill Chen's avatar Mill Chen
Browse files

Add seekbar style

We created a style for seekbar in order to fix contrast ratio. There
are three attributes of seekbar being tinted by specific color,
including thumb, background and active track.

Bug: 317163103
Test: visual verify
Flag: EXEMPT bugfix
Change-Id: If0f3c48e2cec1874a4937a51d5da336da974f294
parent 64ffccdd
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2025 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.
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@android:color/system_neutral2_500" android:lStar="55"/>
</selector>
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2025 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.
  -->
<resources>
    <style name="Seekbar.SettingsLib" parent="@android:style/Widget.Material.SeekBar">
        <item name="android:thumbTint">@android:color/system_accent1_100</item>
        <item name="android:progressTint">@android:color/system_accent1_100</item>
        <item name="android:progressBackgroundTint">@android:color/system_neutral2_500</item>
        <item name="android:progressBackgroundTintMode">src_over</item>
    </style>
</resources>
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2025 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.
  -->
<resources>
    <style name="Seekbar.SettingsLib" parent="@android:style/Widget.Material.SeekBar">
        <item name="android:thumbTint">@android:color/system_accent1_800</item>
        <item name="android:progressTint">@android:color/system_accent1_800</item>
        <item name="android:progressBackgroundTint">@color/settingslib_neutral_variant55</item>
        <item name="android:progressBackgroundTintMode">src_over</item>
    </style>
</resources>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
        <item name="android:textColorPrimary">@color/settingslib_materialColorOnSurface</item>
        <item name="android:textColorSecondary">@color/settingslib_text_color_secondary</item>
        <item name="android:textColorTertiary">@color/settingslib_materialColorOutline</item>
        <item name="android:seekBarStyle">@style/Seekbar.SettingsLib</item>
        <!-- Set up edge-to-edge configuration for top app bar -->
        <item name="android:clipToPadding">false</item>
        <item name="android:clipChildren">false</item>