是否可以定义如下图所示的形状:
我尝试了一个图层列表,但我找不到接近我正在寻找的解决方案。
我想将生成的形状用作具有透明度的 RelativeLayout 的背景图像。
任何提示表示赞赏!谢谢你。
是否可以定义如下图所示的形状:
我尝试了一个图层列表,但我找不到接近我正在寻找的解决方案。
我想将生成的形状用作具有透明度的 RelativeLayout 的背景图像。
任何提示表示赞赏!谢谢你。
这是您要求的形状:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<size
android:width="250dp"
android:height="100dp" />
<solid android:color="#ffffff" />
</shape>
</item>
<item
android:top="0dp">
<shape android:shape="line">
<stroke
android:width="25dp"
android:color="#000000" />
</shape>
</item>
<item
android:right="0dp"
android:left="150dp">
<shape android:shape="oval">
<solid android:color="#000000" />
</shape>
</item>
</layer-list>
截屏: