에서 을 선택하십시오. 레벨 목록 XML에 정의 된 드로어 블 중 하나 인 android:drawable
속성에 대해 어떻게해야합니까?
많은 작은 XML 파일을 정의하지 않도록 레벨 목록 XML 자체에 드로어 블을 정의하고 있습니다.Android XML의 레벨 목록에서 드로어 블을 선택
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/empty"
android:endColor="@android:color/white"
android:angle="90" />
</shape>
</item>
<item android:maxLevel="1">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:startColor="@color/low"
android:endColor="@android:color/white"
android:angle="90" />
</shape>
</item>
<item android:maxLevel="2">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/middle"
android:endColor="@android:color/white"
android:angle="90" />
</shape>
</item>
<item android:maxLevel="3">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/high"
android:endColor="@android:color/white"
android:angle="90" />
</shape>
</item>
<item android:maxLevel="4">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/full"
android:endColor="@android:color/white"
android:angle="90" />
</shape>
</item>
</level-list>