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.
The docs are not clear
- like this never happened before on Android, right? :) – Sidesandroid:useLevel
on the<gradient>
element, with a description of "true if this is used as a LevelListDrawable."LevelListDrawable
definitely has the notion of a level. That being said, I don't understand the relationship here. – Heavy