Time for action - rendering a spinner ring
By default, a shape will assume that it's being used as part of a
LevelListDrawable, and may not appear unless you disable this behavior. You do this by specifying the
useLevel attribute as
false on the shape element. If you don't disable this functionality, the ring will not render correctly, or at all.
- Create a new shape resource XML file in the
spinner.xmland open this file in an editor or IDE.
- Start the root element of the file as a
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="ring"
ringshape requires its relative thickness to be set on the
android:innerRadiusRatio="3.2" android:thicknessRatio="5.333" ...