Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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 core/res/res/drawable/progress_ring_watch.xml +12 −12 Original line number Diff line number Diff line Loading @@ -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> Loading core/res/res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. --> Loading core/res/res/values/dimens_watch.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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> Loading graphics/java/android/framework_graphics.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -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
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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
core/res/res/drawable/progress_ring_watch.xml +12 −12 Original line number Diff line number Diff line Loading @@ -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> Loading
core/res/res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. --> Loading
core/res/res/values/dimens_watch.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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> Loading
graphics/java/android/framework_graphics.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -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" }