如何从Assets文件夹中的图像创建android逐帧动画? [英] how to create an android frame-by-frame animation from images in assets folder?

查看:311
本文介绍了如何从Assets文件夹中的图像创建android逐帧动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是android的初学者,我想创建一个逐帧动画,将其图像放在资产文件夹中。以前,我创建了一个简单的动画,将图像放置在res / drawable文件夹中。我还在该文件夹中放置了gyro_animation.xml文件。在此示例中,我在活动中创建了一个动画,如下所示:

I am a beginner in android, and I want to create a frame-by-frame animation that its images are placed in assets folder. Previously I created a simple animation which the images were placed in res/drawable folder. I also placed a gyro_animation.xml file in that folder. In this sample I created an animation in my activity as it follows:

    ImageView gyroView = (ImageView) findViewById(R.id.gyro);
    gyroView.setBackgroundResource(R.drawable.gyro_animation));
    final AnimationDrawable gyroAnimation = (AnimationDrawable) gyroView.getBackground();

现在要创建动画,使其图像驻留在资产文件夹中,该怎么办?

now for creating an animation that its images are resided in assets folder what should I do ?

预先感谢。

推荐答案

资产文件夹
中的图像单击此处

这篇关于如何从Assets文件夹中的图像创建android逐帧动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆