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

Commit 77a7142c authored by Andrew Sapperstein's avatar Andrew Sapperstein
Browse files

Add attr for customizing progress bar corner radius.

Adds progressBarCornerRadius, a private attr that allows tweaking
the corner radius for progress bars and seek bars.

Also adds default values for Material and DeviceDefault themes
as well as a config_progressBarCornerRadius value for OEM
overlaying.

Updates the backgrounds for SeekBar and determinate ProgressBars
to use the new attr.

Bug: 69314526
Test: ag/3659018
Change-Id: Ifb16472da8829c484beb7d034b019ba9545696be
parent aa23db0f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
          android:gravity="center_vertical|fill_horizontal">
        <shape android:shape="rectangle"
               android:tint="?attr/colorControlNormal">
            <corners android:radius="?attr/progressBarCornerRadius" />
            <size android:height="@dimen/progress_bar_height_material" />
            <solid android:color="@color/white_disabled_material" />
        </shape>
@@ -28,6 +29,7 @@
        <scale android:scaleWidth="100%">
            <shape android:shape="rectangle"
                   android:tint="?attr/colorControlActivated">
                <corners android:radius="?attr/progressBarCornerRadius" />
                <size android:height="@dimen/progress_bar_height_material" />
                <solid android:color="@color/white_disabled_material" />
            </shape>
@@ -38,6 +40,7 @@
        <scale android:scaleWidth="100%">
            <shape android:shape="rectangle"
                   android:tint="?attr/colorControlActivated">
                <corners android:radius="?attr/progressBarCornerRadius" />
                <size android:height="@dimen/progress_bar_height_material" />
                <solid android:color="@color/white" />
            </shape>
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
          android:gravity="center_vertical|fill_horizontal">
        <shape android:shape="rectangle"
               android:tint="@color/control_nodisable_material">
            <corners android:radius="?attr/progressBarCornerRadius" />
            <size android:height="@dimen/seekbar_track_background_height_material" />
            <solid android:color="@color/white_disabled_material" />
        </shape>
@@ -32,6 +33,7 @@
                <item>
                    <shape android:shape="rectangle"
                           android:tint="?attr/colorControlActivated">
                        <corners android:radius="?attr/progressBarCornerRadius" />
                        <size android:height="@dimen/seekbar_track_progress_height_material" />
                        <solid android:color="@color/white_disabled_material" />
                    </shape>
@@ -48,6 +50,7 @@
                <item>
                    <shape android:shape="rectangle"
                           android:tint="?attr/colorControlActivated">
                        <corners android:radius="?attr/progressBarCornerRadius" />
                        <size android:height="@dimen/seekbar_track_progress_height_material" />
                        <solid android:color="@color/white" />
                    </shape>
+3 −0
Original line number Diff line number Diff line
@@ -1019,6 +1019,9 @@
        <!-- Corner radius of buttons. -->
        <attr name="buttonCornerRadius" format="dimension" />

        <!-- Corner radius of progress bars. -->
        <attr name="progressBarCornerRadius" format="dimension" />

        <!-- Style for the search query widget. -->
        <attr name="searchViewStyle" format="reference" />

+2 −0
Original line number Diff line number Diff line
@@ -3328,6 +3328,8 @@
    <dimen name="config_dialogCornerRadius">2dp</dimen>
    <!-- Corner radius of system buttons -->
    <dimen name="config_buttonCornerRadius">@dimen/control_corner_material</dimen>
    <!-- Corner radius of system progress bars -->
    <dimen name="config_progressBarCornerRadius">@dimen/progress_bar_corner_material</dimen>
    <!-- Controls whether system buttons use all caps for text -->
    <bool name="config_buttonTextAllCaps">true</bool>
    <!-- Name of the font family used for system surfaces where the font should use medium weight -->
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@
    <dimen name="seekbar_track_progress_height_material">2dp</dimen>

    <dimen name="progress_bar_height_material">4dp</dimen>
    <dimen name="progress_bar_corner_material">0dp</dimen>

    <!-- Material time picker dimensions. -->
    <!-- Text size for the time picker header HH:MM label. This value is large
Loading