我正在尝试制作一个从屏幕中间以白色发出的渐变,并在向屏幕边缘移动时变为黑色.
当我制作像这样的"普通"渐变时,我一直在尝试不同的形状:
<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)
当使用"椭圆形"形状时,我至少得到了圆形,但没有渐变效果.我怎么能做到这一点?'