I have a thick circle with a transparent center:
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@android:color/transparent"/>
<stroke
android:width="24dp"
android:color="@android:color/white"/>
<size
android:width="72dp"
android:height="72dp"/>
</shape>
and I would like to revive the decrease in the stroke value so that the transparent center expands like an iris.
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="????"
android:valueFrom="24dp"
android:valueTo="4dp"
android:duration="750"
/>
</set>
... but I do not know what to specify as the name of the property. "strokeWidth" doesn't seem to work. I don’t even know how to do this programmatically, because GradientDrawable.setStroke () requires both width and color, and objectAnimator can only work with single parameters.
source
share