Stay organized with collections
Save and categorize content based on your preferences.
AnimatorInflater
open class AnimatorInflater
This class is used to instantiate animator XML files into Animator objects.
For performance reasons, inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use this inflater with an XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from a compiled resource (R. something file.)
Summary
Public constructors
AnimatorInflater
AnimatorInflater()
Public methods
loadAnimator
open static fun loadAnimator(
context: Context!,
id: Int
): Animator!
Loads an Animator object from a resource
| Parameters |
context |
Context!: Application context used to access resources |
id |
Int: The resource id of the animation to load |
| Return |
Animator! |
The animator object reference by the specified id |
| Exceptions |
android.content.res.Resources.NotFoundException |
when the animation cannot be loaded |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]