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

Commit 7988665c authored by Todd Lee's avatar Todd Lee Committed by Chip Fukuhara
Browse files

Update style resources for progress-spinner

This change is split out from ag/22635078 so that the functionality and
the material resources can be done separately. The relevant parts of the
commit message from there are copied below for reference.

- This change modifies the system progress spinner
(indeterminate/horizontal) for use on w3.

spec: https://docs.google.com/presentation/d/1YqqNzmgW6C6-zZJdhE3zTvxPe24BBn66FLYalpSgww0/edit#slide=id.gdea00a2fd1_0_169
video: https://drive.google.com/file/d/1hZzk-UBx7DOx5W7282_nB-5nDb5ppDxb/view?usp=sharing&resourcekey=0-eD2vvlCeyYhdF5sG2AwSmQ

Note that UI makes use of system color attributes:
- colorControlNormal (spinner)
- colorProgressBackgroundNormal (track)

Bug: 194441833
Bug: 192470870
Bug: 192470222

Test: manual check
      - Settings > System > Disconnect & Reset
      - Power > Shutdown
      - Power > Restart

Change-Id: I489dce4a54505738654610b6c7c1666ecbc415fc

Upstreaming Bug: 272532971

Also includes these changes:

--------------------------------------------------------------------

[UX] Update ShutdownThread UI as per UX Spec

Updates include:
* addition of round-watch-specific layout for progressbar screen
* progress bar colors changed from blue to material white and grey
* progress bar text to smaller size
* removed ellipses from string text

Bug: b/257537152
Video: https://broadcast.corp.google.com/ui/player/75926391-22bd-4127-9f38-73dba5fdc0f6
Test: flashed locally and ran fake-ota script
Upstreaming Bug: b/272534061

--------------------------------------------------------------------

Change-Id: I7b0a967606398d1cb91508888649ac03a69b29c8
parent 0e5e8dbd
Loading
Loading
Loading
Loading
+944 −0

File added.

Preview size limit exceeded, changes collapsed.

+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@id/background"
          android:gravity="center_vertical|fill_horizontal">
        <shape android:shape="rectangle">
            <corners android:radius="?attr/progressBarCornerRadius" />
            <size android:height="@dimen/progress_bar_height_material" />
            <solid android:color="@color/material_grey_900" />
        </shape>
    </item>
    <item android:id="@id/secondaryProgress"
          android:gravity="center_vertical|fill_horizontal">
        <scale android:scaleWidth="100%">
            <shape android:shape="rectangle">
                <corners android:radius="?attr/progressBarCornerRadius" />
                <size android:height="@dimen/progress_bar_height_material" />
                <solid android:color="@color/material_grey_900" />
            </shape>
        </scale>
    </item>
    <item android:id="@id/progress"
          android:gravity="center_vertical|fill_horizontal">
        <scale android:scaleWidth="100%">
            <shape android:shape="rectangle">
                <corners android:radius="?attr/progressBarCornerRadius" />
                <size android:height="@dimen/progress_bar_height_material" />
                <solid android:color="@color/white" />
            </shape>
        </scale>
    </item>
</layer-list>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
    <dimen name="progress_bar_size_small">16dip</dimen>
    <dimen name="progress_bar_size_medium">32dip</dimen>
    <dimen name="progress_bar_size_large">64dip</dimen>
    <dimen name="progress_bar_height">24dp</dimen>

    <!-- Progress bar message dimens -->
    <dimen name="message_progress_dialog_text_size">18sp</dimen>
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    <string name="global_action_emergency">Emergency SOS</string>

   <!-- Reboot to Recovery Progress Dialog. This is shown before it reboots to recovery. -->
    <string name="reboot_to_update_prepare">Preparing to update</string>
    <string name="reboot_to_update_title">Wear OS system update</string>

   <!-- Title of the pop-up dialog in which the user switches keyboard, also known as input method. -->
+10 −0
Original line number Diff line number Diff line
@@ -107,4 +107,14 @@ please see styles_device_defaults.xml.
        <item name="paddingStart">@dimen/message_progress_dialog_start_padding</item>
        <item name="paddingTop">@dimen/message_progress_dialog_top_padding</item>
    </style>

    <!-- Material progress part (indeterminate/horizontal) for Wear -->
    <style name="Widget.Material.ProgressBar.Horizontal" parent="Widget.ProgressBar.Horizontal">
        <item name="progressDrawable">@drawable/progress_horizontal_material</item>
        <item name="indeterminateDrawable">
            @drawable/progress_indeterminate_horizontal_material
        </item>
        <item name="minHeight">@dimen/progress_bar_height</item>
        <item name="maxHeight">@dimen/progress_bar_height</item>
    </style>
</resources>