相关疑难解决方法(0)

android中的循环渐变

我正在尝试制作一个从屏幕中间以白色发出的渐变,并在向屏幕边缘移动时变为黑色.

当我制作像这样的"普通"渐变时,我一直在尝试不同的形状:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient android:startColor="#E9E9E9" android:endColor="#D4D4D4"
        android:angle="270"/>
</shape>
Run Code Online (Sandbox Code Playgroud)

当使用"椭圆形"形状时,我至少得到了圆形,但没有渐变效果.我怎么能做到这一点?'

android gradient

96
推荐指数
3
解决办法
9万
查看次数

标签 统计

android ×1

gradient ×1