创建和使用逐帧动画
来源:互联网 发布:海关 wto数据显示 编辑:程序博客网 时间:2024/05/22 09:06
逐帧动画与传统的卡通相似,也有点像gif。就是搞几张图片,根据顺序显示。
AnimationDrawable类可以用来创建一个新的表示为一个Drawable资源的逐帧动画,可以使用XML,在应用程序的res/drawable文件夹下讲动画Drawable资源定义为外部资源。
下面看程序和效果:
<?xml version="1.0" encoding="utf-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/h1" android:duration="500" /> <item android:drawable="@drawable/h2" android:duration="500" /> <item android:drawable="@drawable/h3" android:duration="500" /> <item android:drawable="@drawable/h4" android:duration="500" /></animation-list>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <ImageView android:layout_width="200dp" android:layout_height="200dp" android:src="@drawable/line_gradient" /></RelativeLayout>
由于CSDN不知道咋上传动态图,所以,,,就不上传了。各位自己实验吧。。
1 0
- 创建和使用逐帧动画
- 使用 CocoStudio 创建 Cocos2d-x 序列帧和骨骼动画
- 使用 CocoStudio 创建 Cocos2d-x 序列帧和骨骼动画
- 使用 CocoStudio 创建 Cocos2d-x 序列帧和骨骼动画
- 使用CocoStudio创建Cocos2d-x序列帧和骨骼动画
- 使用cocos2d-iphone和cocos2d-x创建帧动画
- 使用 XAML 和 Expression Blend 创建动画
- 属性动画和帧动画的使用
- 使用Cocos Studio 创建帧动画《1》
- 使用Cocos Studio 创建帧动画《2》
- 使用Cocos Studio 创建帧动画
- 使用plist创建动画
- 使用tween创建动画
- Cocos帧动画Animate和Animation创建
- Silverlight - 使用 XAML 和 Expression Blend 创建动画
- Silverlight - 使用 XAML 和 Expression Blend 创建动画
- Objective-UIImageView的创建和使用(带动画效果)
- 使用SVG和CSS3创建圆形进度条动画
- 今日开博
- uvalive 5760 Alice and Bob (组合游戏,dp)
- Floyd模板
- 如何给MySql创建连接用户并授权
- openstack 快照分析
- 创建和使用逐帧动画
- linux C复习:gcc过程说明
- Android Socket传数据
- NSDate类总结
- 网易新闻:无屌丝,不江湖
- autobook中文版
- Android有用代码片段
- android 中一些属性的意思
- Traceroute(Linux) and Tracert(Windows)-2