TL; DR: explicitly set the useLevel value for all ring shapes used in custom execution steps.
The answer to Kano's question is a way to solve your problem. I am supplementing it to add general information about ring shapes to custom execution strings.
It seems that the default value for useLevel has changed in Android versions. Here is the part of the study related to this.
The following is a working implementation of the progress bar using a ring as a progress indicator and another ring as a progress background:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape android:shape="ring" android:useLevel="false"> <solid android:color="#dae1e6"/> </shape> </item> <item android:id="@android:id/progress"> <rotate android:fromDegrees="-90" android:pivotX="50%" android:pivotY="50%" android:toDegrees="-90"> <shape android:shape="ring" android:useLevel="true"> <solid android:color="#61bcf9"/> </shape> </rotate> </item> </layer-list>
Using it as progressDrawable in a ProgressBar :
<ProgressBar style="?android:attr/progressBarStyleHorizontal" android:layout_width="100dp" android:layout_height="100dp" android:progressDrawable="@drawable/custom_horizontal" android:progress="50" android:max="100" android:id="@+id/progressBar" android:layout_gravity="center"/>
Setting useLevel=true in the form of the run ring and useLevel=false in the form of the background ring gives the correct desired behavior for all versions of Android:

Removing useLevel from the background form:
Pre 5.0 (left) | 5.0 (right)


Removing useLevel from the execution form:
Pre 5.0 (left) | 5.0 (right)


So, as I understand it, useLevel used to indicate whether the progress value affects the form. If it is not (false), it will be completely colored; if it is (true), it will be colored in the same way as the value of progress.
To summarize, it seems that:
useLevel is used by default to true in Android <5.0 , forcing the background ring to track the progress value if useLevel not set in its ring shape, which makes it hidden behind the progress bar ring.useLevel is used by default to false in Android> = 5.0 , causing the progress bar to be completely colored if useLevel not set in its ring form.
So, due to this inconsistency, it is better to explicitly set the value of useLevel to true in figures that depend on progress, and to false in those that do not.
This behavior is based on my observations, I have not found a single source confirming it. Android white papers are not very clear ...