如何将此背景设为 xml 可绘制对象?
How can I make this background as an xml drawable?
我想给我的应用程序一个背景,我想在 xml 文件中创建它,而不是图像。
有人能帮我吗?请
XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="200px">
<shape>
<solid android:color="#6bcbf4" />
</shape>
</item>
<item android:bottom="900px">
<shape android:shape="oval">
<solid android:color="#FFF8F8F8"
/>
</shape>
</item>
</layer-list>
我知道了:
<item android:top="200px">
<shape>
<solid android:color="#FF954CFB" />
</shape>
</item>
<item android:height="10dp">
<shape>
<solid android:color="@color/colorWhite" />
</shape>
</item>
<item android:top="-500dp" android:bottom="300dp" android:left="-100dp" android:right="-100dp">
<shape>
<corners android:radius="400dp" />
<solid android:color="@color/colorWhite" />
</shape>
</item>
我想给我的应用程序一个背景,我想在 xml 文件中创建它,而不是图像。
有人能帮我吗?请
XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="200px">
<shape>
<solid android:color="#6bcbf4" />
</shape>
</item>
<item android:bottom="900px">
<shape android:shape="oval">
<solid android:color="#FFF8F8F8"
/>
</shape>
</item>
</layer-list>
我知道了:
<item android:top="200px">
<shape>
<solid android:color="#FF954CFB" />
</shape>
</item>
<item android:height="10dp">
<shape>
<solid android:color="@color/colorWhite" />
</shape>
</item>
<item android:top="-500dp" android:bottom="300dp" android:left="-100dp" android:right="-100dp">
<shape>
<corners android:radius="400dp" />
<solid android:color="@color/colorWhite" />
</shape>
</item>