我的XML文件是如下.. ADT問我, 「無法解析文件E:\應用程序\維沙爾\工作區\ MyApp的\水庫\繪製\ day.xml」無法解析XML文件繪製
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false"
android:state_focused="false"
android:background="@android:color/transparent"
android:drawable="@drawable/dayoff"/>
<item
android:state_pressed="false"
android:state_focused="true"
android:background="@android:color/transparent"
android:drawable="@drawable/dayon"/>
<item
android:state_pressed="false"
android:state_focused="true"
android:background="@android:color/transparent"
android:drawable="@drawable/dayon"/>
<item
android:drawable="@drawable/dayon"/>
</selector>
這裏dayoff和dayon被繪製文件夾下的兩個png圖片..
哪裏是我錯了?建議plz。
檢查此示例http://developer.android.com/resources/tutorials/views/hello-formstuff.html#CustomButton – Ajay 2012-02-27 08:03:55
我認爲你需要把這個day.xml放到你的res/menu /文件夾中。 – 2012-02-27 08:12:20
@PadmaKumar @PadmaKumar不工作.. – 2012-03-01 06:42:10