我想像这样创建一个渐变但是:
左渐变是我的目标渐变右渐变是我的渐变这是我的渐变代码xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:centerColor="#ffffff"
android:endColor="#4f4f4f"
android:gradientRadius="700"
android:startColor="#ffffff"
android:type="radial" >
</gradient>
请帮助创建像左图片这样的渐变
编辑:在真正的设备我的渐变显示白色。编辑2:这些Gradiant我的朋友发布好但是目标渐变的颜色不在真实设备中显示没有替代方式?
做这个 :
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:centerColor="#E7E6E6"
android:endColor="#DADADA"
android:gradientRadius="800"
android:startColor="#EEEDED"
android:type="radial" >
</gradient>
</shape>
截图:
这是一个使用它的工具,你可以设计任何可绘制的Tool
试试这个
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:type="linear"
android:startColor="#FF2d7706"
android:endColor="#FF98d434"
android:angle="90"/>
</shape>