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

Commit dffad1dd authored by Chen Bai's avatar Chen Bai
Browse files

m3: impl basic Material3 design of progress indicator

Borrowed from touch lock exiting progress indicator.
Before and After videos are attached to the bug.

Flag: EXEMPT. Replacing drawble.
Test: manual
Bug: 379994435
Change-Id: If976442d9162d8756aca10e6a0aaeb05c34a7928
parent b511fa5b
Loading
Loading
Loading
Loading
+43 −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.
  -->

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
        android:fromDegrees = "270"
        android:toDegrees="270"
        android:pivotX="50%"
        android:pivotY="50%" >
    <layer-list>
        <item>
            <shape
                android:shape="ring"
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:thickness="@dimen/progressbar_thickness"
                android:useLevel="false">
                <solid android:color="?attr/materialColorSurfaceContainer"/>
            </shape>
        </item>
        <item>
            <shape
                android:shape="ring"
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:thickness="@dimen/progressbar_thickness"
                android:useLevel="true">
                <solid android:color="?attr/materialColorPrimary"/>
            </shape>
        </item>
    </layer-list>
</rotate>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -31,4 +31,9 @@
    <!-- Opacity factor for disabled material3 widget -->
    <dimen name="disabled_alpha_device_default">0.12</dimen>
    <dimen name="primary_content_alpha_device_default">0.38</dimen>

    <!--  values for material3 progress bar(progress indicator)  -->
    <item name="progressbar_inner_radius_ratio" format="float" type="dimen">2.12</item>
    <dimen name="progressbar_thickness">8dp</dimen>
    <dimen name="progressbar_elevation">0.1dp</dimen>
</resources>
+9 −0
Original line number Diff line number Diff line
@@ -79,4 +79,13 @@
        <item name="maxWidth">@dimen/dialog_btn_negative_width</item>
        <item name="maxHeight">@dimen/dialog_btn_negative_height</item>
    </style>

    <!-- Wear Material3 Progress Bar style: progressed ring.-->
    <style name="Widget.DeviceDefault.ProgressBar.WearMaterial3">
        <item name="indeterminateOnly">false</item>
        <item name="progressDrawable">@drawable/progress_ring_wear_material3</item>
        <item name="minHeight">@dimen/progress_bar_height</item>
        <item name="maxHeight">@dimen/progress_bar_height</item>
        <item name="mirrorForRtl">true</item>
    </style>
</resources>
 No newline at end of file