gpt4 book ai didi

android - 可绘制带有圆形的四色边框

转载 作者:行者123 更新时间:2023-11-29 19:04:49 25 4
gpt4 key购买 nike

是否可以使用图层列表将以下内容作为可绘制对象(用于背景)实现???

enter image description here

最佳答案

对于层列表使用:

 <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size
android:width="56dp"
android:height="56dp" />

<stroke
android:width="10dp"
android:dashGap="20dp"
android:color="#0000ff" />
</shape>
</item>
<item>
<shape android:shape="oval">
<size
android:width="25dp"
android:height="24dp" />

<stroke
android:width="10dp"
android:color="#FF0000"
android:dashGap="20dp"
android:dashWidth="10dp" />
</shape>
</item>

</layer-list>

输出:

enter image description here

相应地更改破折号间距和笔划宽度..

关于android - 可绘制带有圆形的四色边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47693279/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com