我正在尝试将此渐变代码添加到colors.xml,但Eclipse一直说“Invalide start tag shape”
projname / values / colors.xml (目前的内容)
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="radial"
android:gradientRadius="400"
android:startColor="#88cce7"
android:endColor="#075e81"/>
</shape>
<resources>
<color name="bg_red">#FF0000</color>
<color name="bg_white">#FFFFFF</color>
<color name="bg_black">#000000</color>
<color name="opaque_red">#f00</color>
<color name="translucent_red">#80ff0000</color>
</resources>
e.g。这是我试图模仿的渐变:http://i.stack.imgur.com/YMbNR.png