AnimationUtils
2016-01-25 13:24
483 查看
AnimationUtils(示例,出错代码)
android.view.animation
类 AnimationUtils
java.lang.Object android.view.animation.AnimationUtils
public class AnimationUtilsextends Object
Defines common utilities for working with animations.
构造方法摘要 |
---|
AnimationUtils() |
方法摘要 | |
---|---|
static long | currentAnimationTimeMillis() Returns the current animation time in milliseconds. |
static Animation[/code] | loadAnimation(Context context, int id) Loads an Animation object from a resource |
static Interpolator | loadInterpolator(Context context, int id) Loads an Interpolator object from a resource |
static LayoutAnimationController[/code] | loadLayoutAnimation(Context context, int id) |
static Animation | makeInAnimation(Context c, boolean fromLeft) Make an animation for objects becoming visible. |
static Animation | makeInChildBottomAnimation(Context c) Make an animation for objects becoming visible. |
static Animation | makeOutAnimation(Context c, boolean toRight) Make an animation for objects becoming invisible. |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
AnimationUtils
public AnimationUtils()
方法详细信息 |
---|
currentAnimationTimeMillis
public static long currentAnimationTimeMillis()
Returns the current animation time in milliseconds. This time should be used when invoking Animation.setStartTime(long). Refer to SystemClock for more information about the different available clocks. The clock used by this method is not the "wall" clock (it
is not System.currentTimeMillis()).
返回:the current animation time in milliseconds另请参见:SystemClock
loadAnimation
public static Animation loadAnimation(Context context, int id) throws Resources.NotFoundException
Loads an Animation object from a resource
参数:
context- Application context used to access resources
id- The resource id of the animation to load返回:The animation object reference by the specified id抛出:
Resources.NotFoundException- when the animation cannot be loaded
loadLayoutAnimation
public static LayoutAnimationController loadLayoutAnimation(Context context, int id) throws Resources.NotFoundException
抛出:
Resources.NotFoundException
makeInAnimation
public static Animation makeInAnimation(Context c, boolean fromLeft)
Make an animation for objects becoming visible. Uses a slide and fade effect.
参数:
c- Context for loading resources
fromLeft- is the object to be animated coming from the left返回:The new animation
makeOutAnimation
public static Animation makeOutAnimation(Context c, boolean toRight)
Make an animation for objects becoming invisible. Uses a slide and fade effect.
参数:
c- Context for loading resources
toRight- is the object to be animated exiting to the right返回:The new animation
makeInChildBottomAnimation
public static Animation makeInChildBottomAnimation(Context c)
Make an animation for objects becoming visible. Uses a slide up and fade effect.
参数:
c- Context for loading resources返回:The new animation
loadInterpolator
public static Interpolator loadInterpolator(Context context, int id) throws Resources.NotFoundException
Loads an Interpolator object from a resource
参数:
context- Application context used to access resources
id- The resource id of the animation to load返回:The animation object reference by the specified id抛出:
Resources.NotFoundException
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件