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

Commit 2b9e7447 authored by Anton Potapov's avatar Anton Potapov
Browse files

Update slider style

Flag: com.android.systemui.volume_redesign
Test: manual on foldable
Bug: 369994956
Change-Id: I82f63d9f22828b4b8e9f0fb712304d0db83bc3bf
parent c703aec7
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:color="?androidprv:attr/materialColorPrimary" android:state_enabled="true" />
    <item android:color="?androidprv:attr/materialColorSurfaceContainerHighest" />
</selector>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:color="?androidprv:attr/materialColorSurfaceContainerHighest" android:state_enabled="true" />
    <item android:color="?androidprv:attr/materialColorPrimary" />
</selector>
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:color="?androidprv:attr/materialColorSurfaceContainerHighest" android:state_enabled="false" />
    <item android:color="?androidprv:attr/materialColorPrimary" />
</selector>
+2 −1
Original line number Diff line number Diff line
@@ -18,10 +18,11 @@
    android:layout_height="@dimen/volume_dialog_slider_height">

    <com.google.android.material.slider.Slider
        style="@style/SystemUI.Material3.Slider.Volume"
        android:id="@+id/volume_dialog_slider"
        android:layout_width="@dimen/volume_dialog_slider_height"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:rotation="270"
        android:theme="@style/Theme.MaterialComponents.DayNight" />
        android:theme="@style/Theme.Material3.Light" />
</FrameLayout>
+14 −0
Original line number Diff line number Diff line
@@ -557,6 +557,20 @@
        <item name="android:showWhenLocked">true</item>
    </style>

    <style name="SystemUI.Material3.Slider.Volume">
        <item name="trackHeight">40dp</item>
        <item name="thumbHeight">52dp</item>
    </style>

    <style name="SystemUI.Material3.Slider" parent="@style/Widget.Material3.Slider">
        <item name="labelStyle">@style/Widget.Material3.Slider.Label</item>
        <item name="thumbColor">@color/slider_thumb_color</item>
        <item name="tickColorActive">@color/slider_inactive_track_color</item>
        <item name="tickColorInactive">@color/slider_active_track_color</item>
        <item name="trackColorActive">@color/slider_active_track_color</item>
        <item name="trackColorInactive">@color/slider_inactive_track_color</item>
    </style>

    <style name="Theme.SystemUI.DayNightDialog" parent="@android:style/Theme.DeviceDefault.Light.Dialog"/>

    <style name="Theme.SystemUI.Dialog" parent="@style/Theme.SystemUI.DayNightDialog">
Loading