I am trying to define a circular background to be used as a background for buttons.
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="@dimen/abc_button_inset_horizontal_material"
android:insetTop="@dimen/abc_button_inset_vertical_material"
android:insetRight="@dimen/abc_button_inset_horizontal_material"
android:insetBottom="@dimen/abc_button_inset_vertical_material">
<shape android:shape="oval">
<solid android:color="@color/material_orange_200" />
<padding android:left="@dimen/abc_button_padding_horizontal_material"
android:top="@dimen/abc_button_padding_vertical_material"
android:right="@dimen/abc_button_padding_horizontal_material"
android:bottom="@dimen/abc_button_padding_vertical_material" />
</shape>
</inset>
The problem is that if the button is not completely square the shape get stretched into oval (elipsoid) which is undesirable. I could use <size>
tag and set width and height to the same arbitrary value. But this would defeat the purpose to use this background as universal background for different size buttons.
Is there a way to force (in xml) oval shape to remain a circle?