I've drawn a ring shape, here it is:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:useLevel="false">
<solid android:color="@android:color/holo_blue_light" />
<size
android:width="200dp"
android:height="200dp" />
</shape>
I've specified no innerRadiusRatio or thicknessRatio attributes, so, according to the documentation (for innerRadiusRatio, for thicknessRatio), they are going to be 9 and 3, respectively.
However, when I retrieve the values programatically, they appear to be the other way around:
val ring = ContextCompat.getDrawable(this, R.drawable.ring) as GradientDrawable
Log.i(TAG, "thicknessRatio = ${ring.thicknessRatio}")
Log.i(TAG, "innerRadiusRatio = ${ring.innerRadiusRatio}")
The output is:
thicknessRatio = 9.0
innerRadiusRatio = 3.0
I can't think of anything but a bug here.
Perhaps I am missing something?
And the resulting ring obviously seems to have its thickness less than its inner radius:

Looks like it is.
That's because these values are divisors of the width:
And the documentation provided via the links in the question confirms the same, except for the default values, which are incorrect: