【发布时间】:2009-09-11 17:00:05
【问题描述】:
我正在使用一个可以翻转的动画(在ImageView),但动画效果不流畅(看起来像性能问题)。图片是大小为 128x128 的 PNG 文件。
在这里我将发布我的动画代码:
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale
android:fromXScale="1.0"
android:toXScale="0.0"
android:fromYScale="1.0"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500"
android:fillAfter="false"
android:fillEnabled="false"
/>
</set>
我还想强调,包含视图最多可以有八个这样的ImageViews(它们也被缩放)。
能否请您提供任何可以提高动画性能的建议?
【问题讨论】:
-
你是在模拟器还是真机上测试?物理设备有一些模拟器没有的硬件加速,所以这可能会有所帮助。
标签: android performance animation