我正在開發一個包含許多自定義按鈕的android應用程序。我是否需要爲每個文件創建一個.xml文件,或者是否有將所有這些文件放入一個.xml文件的方法?有沒有什麼辦法可以將我的自定義按鈕放在android中的一個XML文件中?
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:drawable="@drawable/father2" ></item>
<item android:drawable="@drawable/father" ></item>
我可以使用多種自定義按鈕的代碼在一個XML文件?
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false" >
<item android:drawable="@drawable/brother1" android:duration="200"/>
<item android:drawable="@drawable/brother2" android:duration="200"/>
<item android:drawable="@drawable/brother3" android:duration="200"/>
<item android:drawable="@drawable/brother4" android:duration="200"/>
<item android:drawable="@drawable/brother5" android:duration="200"/>
而且我也有一個動畫列表;我可以在一個XML文件中使用多個動畫列表嗎?
的你想什麼來實現,將有助於得到更好的答案 – 2012-04-03 21:58:29