我正在尝试创建一个由三个圆组成的内部图层。在里面我会有一个花朵的图像。
背景可以改变…
如果它放在一个蓝色的背景上,它将是蓝色的阴影。因此,我需要以某种方式调整交易,使之生效。
中心
必须始终
但是要完全变白。然后我想在中间添加我的图像。
我创建了一个层列表来实现这一点,但是我不能让圆透明化,我只能让两个圆出现?
如何使位图显示在中间?
<?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="#726"/>
<size
android:width="35dp"
android:height="35dp"/>
</shape>
</item>
<item>
<shape android:shape="oval">
<solid android:color="#00f"/>
<size
android:width="25dp"
android:height="25dp"/>
</shape>
</item>
<item>
<shape android:shape="oval">
<stroke android:color="@android:color/transparent"
android:width="5dp"/>
<solid android:color="#f00"/>
<size
android:width="10dp"
android:height="10dp"/>
</shape>
</item>
</layer-list>