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

Commit 85efbd47 authored by Chen Bai's avatar Chen Bai
Browse files

m3: allow determinate option for watch ProgressBar widget

Historically, Widget.ProgressBar's most children don't allow
determinate behavior. Phone uses *.ProgressBar.Horizontal as the way to
enable determinate.

For watch, the Progress Indicator(determinate ProgressBar) is a ring
which is too far from being "Horizontal". So, instead of overriding the
Widget.DeviceDefault.ProgressBar.Horizontal, we decide to enable
determinate option for Widget.DeviceDefault.ProgressBar and pass in our
own progress drawable as the default for such option. Since this style
doesn't allow determinate in base res dir, our drawble won't override
existing settings.

Flag: EXEMPT. append instead of overriding existing res
Test: manual
Bug: 379994435
Change-Id: Ib7186acb2c33609d8351e3d5ac7feb8387d30275
parent 41ef600b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -85,4 +85,11 @@
        <item name="maxHeight">@dimen/progress_bar_height</item>
        <item name="mirrorForRtl">true</item>
    </style>

    <style name="Widget.DeviceDefault.ProgressBar" parent="Widget.Material.ProgressBar">
        <!-- Allow determinate option -->
        <item name="indeterminateOnly">false</item>
        <!-- Use Wear Material3 ring shape as default determinate drawable -->
        <item name="progressDrawable">@drawable/progress_ring_watch</item>
    </style>
</resources>