Android -purpose of useLevel in shape tag

Viewed 10966

What is the purpose of android shape xml tag useLevel attribute ? This is in respect to a layer-list but should not matter. From the docs i found the meanging of the useLevel tag:

Indicates whether the drawable's level affects the way the gradient is drawn.

So if i have the following xml snippet:

    <?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="ring"
    android:innerRadius="15dp"
    android:thickness="10dp"
    android:useLevel="false">

    <solid android:color="#ababf2" />

    <size
        android:height="50dp"
        android:width="50dp" />
</shape>

then with the useLevel=true, the ring is disabled. It must be false for the ring to appear. But what is the purpose of this attribute ? The docs are not clear.

1 Answers
Related