答案 0 :(得分:3)
你可以试试这个;
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="#BCBCBC" />
</shape>
</item>
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp" android:drawable="@drawable/your_cross_icon">
<shape android:shape="oval">
<solid android:color="#BCBCBC" />
</shape>
</item>
</layer-list>
答案 1 :(得分:1)
创建这个可绘制的
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="#666"/>
</shape>
然后将其作为图像视图的背景,并将X作为imageview的src
圆圈是图像背后的可绘制物。
这样你可以重复使用drawable并放入几个图标