Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 逐帧动画API兼容性_Android - Fatal编程技术网

Android 逐帧动画API兼容性

Android 逐帧动画API兼容性,android,Android,我使用以下代码按帧设置Frmae动画: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); final ImageView back = (ImageView) findViewById(R.id.splash_image); back.se

我使用以下代码按帧设置Frmae动画:

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

        setContentView(R.layout.splash);



        final ImageView back = (ImageView) findViewById(R.id.splash_image);
        back.setBackgroundResource(R.drawable.splash_animation);

        AnimationDrawable frameAnimation = (AnimationDrawable) back.getBackground();

         // Start the animation (looped playback by default).
         frameAnimation.setExitFadeDuration(2000);
         frameAnimation.start();
}

但是,
setExitFadeDuration
仅在API级别11之后工作。是否有一个替代代码,我用来使动画与API 7兼容

检查这一点,它可能会帮助你..虽然有一点。在这里,我已经开始点击图像的帧动画。如果我使用你的代码,图像将改变,但不会有任何褪色效果,这是我想要实现的。