gpt4 book ai didi

android - 如何在单个渐变android中合并两个形状

转载 作者:太空宇宙 更新时间:2023-11-03 13:11:15 25 4
gpt4 key购买 nike

enter image description here

如何在两者中合并边框或单一渐变。如何可能??

已经尝试过如下这种背景形状:-shape.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="175dp">
<shape android:shape="oval">
<gradient
android:angle="135"
android:startColor="#f56f2c"
android:endColor="#fa9f46"/>

</shape>

</item>
<item
android:bottom="40dp"
>
<shape android:shape="rectangle">
<gradient
android:angle="135"
android:startColor="#f56f2c"
android:endColor="#fa9f46"/>
</shape>
</item>
</layer-list>

最佳答案

例子:

<item
android:top="165dp">
<shape android:shape="oval"
>
<gradient
android:angle="0"
android:startColor="#C96DD8"
android:centerColor="#C96DD8"
android:endColor="#C96DD8"/>

</shape>
</item>
<item
android:bottom="40dp">
<shape android:shape="rectangle">
<gradient
android:angle="-90"
android:startColor="#3023AE"
android:centerColor="#7344ac"
android:endColor="#C96DD8"/>
</shape>
</item>

关于android - 如何在单个渐变android中合并两个形状,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44603763/

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