Resources.GetAnimation(Int32) Method

Definition

Return an XmlResourceParser through which you can read an animation description for the given resource ID.

[Android.Runtime.Register("getAnimation", "(I)Landroid/content/res/XmlResourceParser;", "GetGetAnimation_IHandler")]
public virtual System.Xml.XmlReader GetAnimation (int id);
[<Android.Runtime.Register("getAnimation", "(I)Landroid/content/res/XmlResourceParser;", "GetGetAnimation_IHandler")>]
abstract member GetAnimation : int -> System.Xml.XmlReader
override this.GetAnimation : int -> System.Xml.XmlReader

Parameters

id
Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

A new parser object through which you can read the XML data.

Attributes

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

Return an XmlResourceParser through which you can read an animation description for the given resource ID. This parser has limited functionality -- in particular, you can't change its input, and only the high-level events are available.

This function is really a simple wrapper for calling #getXml with an animation resource.

Java documentation for android.content.res.Resources.getAnimation(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also