ShadowLegacyChoreographer
, ShadowPausedChoreographer
@Implements(value=android.view.Choreographer.class, shadowPicker=Picker.class) public abstract class ShadowChoreographer extends Object
Choreographer
.
Different shadow implementations will be used depending on the current LooperMode
. See
ShadowLegacyChoreographer
and ShadowPausedChoreographer
for details.
Modifier and Type | Class | Description |
---|---|---|
static class |
ShadowChoreographer.Picker |
Constructor | Description |
---|---|
ShadowChoreographer() |
Modifier and Type | Method | Description |
---|---|---|
static long |
getFrameInterval() |
Return the current inter-frame interval.
|
static void |
setFrameInterval(long frameInterval) |
Set the inter-frame interval used to advance the clock.
|
static void |
setPostCallbackDelay(int delayMillis) |
Allows application to specify a fixed amount of delay when
#postCallback(int, Runnable,
Object) is invoked. |
static void |
setPostFrameCallbackDelay(int delayMillis) |
Allows application to specify a fixed amount of delay when
#postFrameCallback(FrameCallback) is invoked. |
public static void setPostCallbackDelay(int delayMillis)
#postCallback(int, Runnable,
Object)
is invoked. The default delay value is 0. This can be used to avoid infinite animation
tasks to be spawned when the Robolectric Scheduler
is in Scheduler.IdleState.PAUSED
mode.
Only supported in LooperMode.Mode.LEGACY
public static void setPostFrameCallbackDelay(int delayMillis)
#postFrameCallback(FrameCallback)
is invoked. The default delay value is 0. This can be used
to avoid infinite animation tasks to be spawned when in LooperMode PAUSED or Scheduler.IdleState.PAUSED
and displaying an animation.public static long getFrameInterval()
Can only be used in LooperMode.Mode.LEGACY
public static void setFrameInterval(long frameInterval)
Only supported in LooperMode.Mode.LEGACY
frameInterval
- Inter-frame interval.