Android 无法获得正确的逐帧动画

Android 无法获得正确的逐帧动画,android,animation,Android,Animation,这是我的代码,resultpage1和resultpage2是我的.jpg文件。这是我的背景图像,我需要将其设置为动画。图像中充满了红心,我需要红心从顶部掉落。成功添加了背景图像,但动画不正确。掉落的红心在晃动,而不是缓慢掉落。我需要红心慢慢地跌倒,而不是颤抖。我对android还不熟悉。请帮助我 <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.a

这是我的代码,resultpage1和resultpage2是我的.jpg文件。这是我的背景图像,我需要将其设置为动画。图像中充满了红心,我需要红心从顶部掉落。成功添加了背景图像,但动画不正确。掉落的红心在晃动,而不是缓慢掉落。我需要红心慢慢地跌倒,而不是颤抖。我对android还不熟悉。请帮助我

   <?xml version="1.0" encoding="utf-8"?>
  <animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
  <item
    android:drawable="@drawable/resultpage1"
    android:duration="50"/>
    <item
    android:drawable="@drawable/resultpage2"
    android:duration="50"/>
    <item
    android:drawable="@drawable/resultpage3"
    android:duration="50"/>
    <item
    android:drawable="@drawable/resultpage4"
    android:duration="50"/>
    <item
    android:drawable="@drawable/resultpage5"
    android:duration="50"/>
   </animation-list>

您应该为此使用优化的png图像。在大多数情况下,您还需要两个以上的图像。如果只使用两个图像,动画几乎会产生频闪效果。下面是关于不同xml动画的更多信息


但我见过有人用这个jpg图像来制作动画。。!!我现在已经用了5张图片,但是心仍然没有慢慢地落下。它只是摇摇晃晃的@Trent Pierce