0
我想添加這個梯度代碼colors.xml但是Eclipse口口聲聲說 「Invalide開始標籤形狀」在Android中應該在哪個文件夾/文件中定義背景漸變?
projname /價值/ 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>
例如這是我試圖模擬的漸變:http://i.stack.imgur.com/YMbNR.png
它應該在res/drawable文件夾中 – Lavanya 2011-05-24 05:43:52