zoukankan      html  css  js  c++  java
  • 创建和使用逐帧动画

    传统动漫框架相似。也有点像gif。只是做了几张照片,根据示出的顺序。

    AnimationDrawable可以用来创建一个新类是由一个表示Drawable资源-frame动画,可以使用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不知道咋上传动态图,所以,,。没有上传。

    我们自己的实验了。

    版权声明:本文博客原创文章,博客,未经同意,不得转载。

  • 相关阅读:
    简明Secure boot介绍
    密码学有什么用?
    mkimage, no such file or dir
    嵌入式系统安全简介
    希尔排序
    jQuery选择器
    css 选择器
    安装 SQL Server 2008 和管理工具 SQL Server 2008 management studio 及相关问题解决
    mac下安装安卓开发环境
    IOS开发小记-内存管理
  • 原文地址:https://www.cnblogs.com/yxwkf/p/4609954.html
Copyright © 2011-2022 走看看