2011-01-27 181 views
0

有人可以提供使用.png文件创建动画所需的代码和XML文件吗? 我试着在这里http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html动画 - GIF

的一个给定的,但一旦I型,

<animation-list android:id="selected" android:oneshot="false"> 
<item android:drawable="@drawable/connected01" android:duration="50" /> 
<item android:drawable="@drawable/connected02" android:duration="50" /> 
<item android:drawable="@drawable/connected03" android:duration="50" /> 
<item android:drawable="@drawable/connected04" android:duration="50" /> 
<item android:drawable="@drawable/connected05" android:duration="50" /> 
</animation-list> 

我得到一个错误:“绑定前缀”

有人会说这到底是怎么完成?

+0

可能的重复? http://stackoverflow.com/questions/2221221/frequent-problem-in-android-view-error-parsing-xml-unbound-prefix – 2011-01-27 12:17:38

回答

3

我认为你应该添加xmlns:android="http://schemas.android.com/apk/res/android"到你的xml的第一项

+0

是啊!我今天知道了!非常感谢 :) – msumaithri 2011-01-28 05:27:35