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

Commit 6d57d74a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I588213b0,I358acb98 into main

* changes:
  m3: refine watch default determinate progress bar
  m3: enable GradientDrawable to draw round cap arc
parents 173e287c 3d72a615
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18112,6 +18112,7 @@ package android.graphics.drawable {
    method public void setThickness(@Px int);
    method public void setThicknessRatio(@FloatRange(from=0.0f, fromInclusive=false) float);
    method public void setUseLevel(boolean);
    field @FlaggedApi("com.android.graphics.flags.gradient_drawable_shape_rounded_cap") public static final int ARC = 4; // 0x4
    field public static final int LINE = 2; // 0x2
    field public static final int LINEAR_GRADIENT = 0; // 0x0
    field public static final int OVAL = 1; // 0x1
+12 −12
Original line number Diff line number Diff line
@@ -17,26 +17,26 @@

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
        android:fromDegrees="270"
        android:toDegrees="270"
        android:pivotX="50%"
        android:pivotY="50%" >
        android:toDegrees="270">
    <layer-list>
        <item>
            <shape
                android:shape="ring"
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:shape="arc"
                android:useLevel="false"
                android:thickness="@dimen/progressbar_thickness"
                android:useLevel="false">
                <solid android:color="@color/materialColorSurfaceContainer"/>
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:strokeCap="round">
                <solid android:color="@*android:color/materialColorSurfaceContainer"/>
            </shape>
        </item>
        <item>
            <shape
                android:shape="ring"
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:shape="arc"
                android:useLevel="true"
                android:thickness="@dimen/progressbar_thickness"
                android:useLevel="true">
                <solid android:color="@color/materialColorPrimary"/>
                android:innerRadiusRatio="@dimen/progressbar_inner_radius_ratio"
                android:strokeCap="round">
                <solid android:color="@*android:color/materialColorPrimary"/>
            </shape>
        </item>
    </layer-list>
+8 −0
Original line number Diff line number Diff line
@@ -6934,6 +6934,8 @@
            <enum name="line" value="2" />
            <!-- Ring shape. -->
            <enum name="ring" value="3" />
            <!-- ARC shape. -->
            <enum name="arc" value="4"/>
        </attr>
        <!-- Inner radius of the ring expressed as a ratio of the ring's width. For instance,
             if innerRadiusRatio=9, then the inner radius equals the ring's width divided by 9.
@@ -6966,6 +6968,12 @@
        <attr name="opticalInsetRight" />
        <!-- Bottom optical inset. -->
        <attr name="opticalInsetBottom" />
        <!-- Attributes that customize the stroke line cap. @hide -->
        <attr name="strokeCap" format="enum">
            <enum name="butt" value="0"/>
            <enum name="round" value="1"/>
            <enum name="square" value="2"/>
        </attr>
    </declare-styleable>
    <!-- Used to specify the size of the shape for GradientDrawable. -->
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
    <dimen name="primary_content_alpha_device_default">0.38</dimen>

    <!--  values for wear material3 progress bar(progress indicator)  -->
    <item name="progressbar_inner_radius_ratio" format="float" type="dimen">2.12</item>
    <item name="progressbar_inner_radius_ratio" format="float" type="dimen">2</item>
    <dimen name="progressbar_thickness">8dp</dimen>
    <dimen name="progressbar_elevation">0.1dp</dimen>

+8 −0
Original line number Diff line number Diff line
@@ -42,3 +42,11 @@ flag {
  description: "Add DISPLAY_BT2020 ColorSpace support"
  bug: "344038816"
}

flag {
  name: "gradient_drawable_shape_rounded_cap"
  is_fixed_read_only: true
  namespace: "core_graphics"
  description: "Make GradientDrawable support drawing ring with rounded stroke cap."
  bug: "380000245"
}
Loading