语言

AnimationUtils.LoadAnimation(Context, Int32) 方法

定义

Animation从资源加载对象

[Android.Runtime.Register("loadAnimation", "(Landroid/content/Context;I)Landroid/view/animation/Animation;", "")]
public static Android.Views.Animations.Animation? LoadAnimation(Android.Content.Context? context, int id);
[<Android.Runtime.Register("loadAnimation", "(Landroid/content/Context;I)Landroid/view/animation/Animation;", "")>]
static member LoadAnimation : Android.Content.Context * int -> Android.Views.Animations.Animation

参数

context
Context

用于访问资源的应用程序上下文

id
Int32

要加载的动画的资源 ID

返回

由指定 ID 引用的动画对象

特性

例外

无法加载动画时

注解

Animation从资源加载对象

Java文档android.view.animation.AnimationUtils.loadAnimation(android.content.Context, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于