今天试了一下渐变的效果 还不错
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:type="radial" android:gradientRadius="250"
android:startColor="#E9E9E9" android:endColor="#D4D4D4" />
</shape>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:angle="0" android:startColor="#FFdaf3fc"
android:centerColor="#FFd4e9a9" android:endColor="#FFdaf3fc"/>
</shape>
在这里要注意android:type="radial"类型的使用会有不同的效果
android:centerColor="#FFd4e9a9" 通常这个也不是被人常用
尝试渐变效果
本文分享了作者尝试不同类型的渐变效果的经历,并展示了两种XML代码实现方式:径向渐变和角度渐变。通过调整颜色和参数,可以创造出丰富的视觉效果。
5820

被折叠的 条评论
为什么被折叠?



