MotionUtils
public
class
MotionUtils
extends Object
java.lang.Object
|
↳ |
com.google.android.material.motion.MotionUtils
|
A utility class for motion system functions.
Summary
Public methods |
static
int
|
resolveThemeDuration(Context context, int attrResId, int defaultDuration)
Resolve a duration from a material duration theme attribute.
|
static
TimeInterpolator
|
resolveThemeInterpolator(Context context, int attrResId, TimeInterpolator defaultInterpolator)
Load an interpolator from a material easing theme attribute.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public methods
resolveThemeDuration
public static int resolveThemeDuration (Context context,
int attrResId,
int defaultDuration)
Resolve a duration from a material duration theme attribute.
Parameters |
context |
Context : the context from where the theme attribute will be resolved. |
attrResId |
int : the motionDuration* theme attribute to resolve |
defaultDuration |
int : the duration to be returned if unable to resolve attrResId |
Returns |
int |
the resolved int duration which attrResId points to or the defaultDuration if resolution was unsuccessful.
|
resolveThemeInterpolator
public static TimeInterpolator resolveThemeInterpolator (Context context,
int attrResId,
TimeInterpolator defaultInterpolator)
Load an interpolator from a material easing theme attribute.
Parameters |
context |
Context : context from where the theme attribute will be resolved |
attrResId |
int : the motionEasing* theme attribute to resolve |
defaultInterpolator |
TimeInterpolator : the interpolator to be returned if unable to resolve attrResId . |
Returns |
TimeInterpolator |
the resolved TimeInterpolator which attrResId points to or the defaultInterpolator if resolution was unsuccessful.
|
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]