zoukankan      html  css  js  c++  java
  • Tween animation

    Tween animation

      An animation defined in XML that performs transitions such as rotating, fading, moving, and stretching on a graphic.

        res/anim/filename.xml

      In Java: R.anim.filename
      In XML: @[package:]anim/filename

    <?xml version="1.0" encoding="utf-8"?>
    <set xmlns:android="http://schemas.android.com/apk/res/android"
        android:interpolator="@[package:]anim/interpolator_resource"
        android:shareInterpolator=["true" | "false"] >
        <alpha
            android:fromAlpha="float"
            android:toAlpha="float" />
        <scale
            android:fromXScale="float"
            android:toXScale="float"
            android:fromYScale="float"
            android:toYScale="float"
            android:pivotX="float"
            android:pivotY="float" />
        <translate
            android:fromXDelta="float"
            android:toXDelta="float"
            android:fromYDelta="float"
            android:toYDelta="float" />
        <rotate
            android:fromDegrees="float"
            android:toDegrees="float"
            android:pivotX="float"
            android:pivotY="float" />
        <set>
            ...
        </set>
    </set>
    View Code

      The file must have a single root element: either an <alpha><scale><translate><rotate>, or<set> element that holds a group (or groups) of other animation elements (even nested <set>elements).

      This application code will apply the animation to an ImageView and start the animation:

    ImageView image = (ImageView) findViewById(R.id.image);
    Animation hyperspaceJump = AnimationUtils.loadAnimation(this, R.anim.hyperspace_jump);
    image.startAnimation(hyperspaceJump);

    参考:http://android.xsoftlab.net/guide/topics/resources/animation-resource.html#Tween

  • 相关阅读:
    uniGUI之uniEdit(23)
    ​Shiro授权
    Shiro密码重试次数限制
    Ehcache基础入门
    Shiro简单加密服务
    Shiro身份验证
    第二章、Web中使用shiro(实现登陆)
    第一章、认识Shiro
    使用IntelliJ/Eclipse生成类图
    Jedis操作Redis实例
  • 原文地址:https://www.cnblogs.com/tekkaman/p/6726548.html
Copyright © 2011-2022 走看看