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

Commit 81d77746 authored by Stefan Maftei's avatar Stefan Maftei
Browse files

[Expressive design] Update Slider style

- Update colors of tick, thumb and tracks for both enabled/disabled states

Bug: 409389527
Test: visual
Flag: EXEMPT resource update
Change-Id: I635cc2ef3d7ab1151410245b3a8e69daf1bdf344
parent b926bb83
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2024 The Android Open Source Project
  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.
@@ -15,9 +15,12 @@
  limitations under the License.
  -->

<resources>
    <color name="settingslib_expressive_color_slider_track_active">@color/settingslib_materialColorPrimary</color>
    <color name="settingslib_expressive_color_slider_track_inactive">@color/settingslib_materialColorSurfaceContainerHighest</color>
    <color name="settingslib_expressive_color_slider_thumb">@color/settingslib_materialColorPrimary</color>
    <color name="settingslib_expressive_color_slider_halo">@android:color/transparent</color>
</resources>
 No newline at end of file
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- State Disabled -->
    <item
        android:alpha="0.38"
        android:color="@color/settingslib_materialColorOnSurface"
        android:state_enabled="false"/>

    <item android:color="@color/settingslib_materialColorPrimary" />
</selector>
 No newline at end of file
+26 −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">
    <!-- State Disabled -->
    <item
        android:alpha="0.38"
        android:color="@color/settingslib_materialColorOnSurface"
        android:state_enabled="false"/>

    <item android:color="@color/settingslib_materialColorPrimary" />
</selector>
 No newline at end of file
+26 −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">
    <!-- State Disabled -->
    <item
        android:alpha="0.12"
        android:color="@color/settingslib_materialColorOnSurface"
        android:state_enabled="false"/>

    <item android:color="@color/settingslib_materialColorSecondaryContainer" />
</selector>
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
@@ -457,4 +457,13 @@
        <item name="backgroundTint">@color/settingslib_materialColorOutlineVariant</item>
        <item name="android:textColor">@color/settingslib_materialColorPrimary</item>
    </style>

    <style name="SettingslibSliderStyle.Expressive" parent="">
        <item name="trackColorActive">@color/settingslib_expressive_color_slider_track_active</item>
        <item name="trackColorInactive">@color/settingslib_expressive_color_slider_track_inactive</item>
        <item name="thumbColor">@color/settingslib_expressive_color_slider_thumb</item>
        <item name="tickColorActive">@color/settingslib_expressive_color_slider_track_inactive</item>
        <item name="tickColorInactive">@color/settingslib_expressive_color_slider_track_active</item>
        <item name="haloColor">@android:color/transparent</item>
    </style>
</resources>
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:theme="@style/Theme.MaterialComponents.DayNight" />
        android:theme="@style/Theme.MaterialComponents.DayNight"
        style="@style/SettingslibSliderStyle.Expressive" />

    <FrameLayout
        android:id="@+id/icon_end_frame"
Loading