【发布时间】:2009-11-26 12:09:32
【问题描述】:
我在将动画应用到视图时遇到问题。我正在尝试从 CursorAdapter 的构造函数中加载动画,因此我可以稍后将其设置为将其分配给列表中的某些子项。
在我的构造函数中:
shineAnimation = AnimationUtils.loadAnimation(ctx, R.anim.news_list_item_shine);
动画在我的 res/anim 目录中
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true">
<item android:drawable="@drawable/shine1" android:duration="200" />
<item android:drawable="@drawable/shine2" android:duration="200" />
<item android:drawable="@drawable/shine3" android:duration="200" />
<item android:drawable="@drawable/shine4" android:duration="200" />
<item android:drawable="@drawable/shine5" android:duration="200" />
</animation-list>
我遇到了一个例外: 未知动画名称:animation-list
非常感谢您的帮助
谢谢 S
【问题讨论】: