我正在尝试使用XML制作一个带光晕的圆形。光晕应该从中心开始是绿色,逐渐淡化为边缘处的透明。
如何实现呢?
我尝试使用以下方法:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<gradient android:centerColor="@drawable/light_green" android:gradientRadius="250" android:type="radial"
android:endColor="@android:color/transparent"
android:angle="270"/>
</shape>
仍然无法获得所需的效果。任何线索都将有所帮助。