For me, setting the gravity of the item to “center” solved the issue.
For example:
<item android:id="@android:id/progress" android:gravity="center">
<clip>
<shape>
<size android:height="2dp"/>
<solid android:color="@color/my_color"/>
</shape>
</clip>
</item>