Android Guides | Samples

Android.Views.Choreographer Class

Coordinates the timing of animations, input and drawing.

See Also: Choreographer

Syntax

[Android.Runtime.Register("android/view/Choreographer", DoNotGenerateAcw=true)]
public sealed class Choreographer : Object

Remarks

Coordinates the timing of animations, input and drawing.

  • If your application does its rendering in a different thread, possibly using GL, or does not use the animation framework or view hierarchy at all and you want to ensure that it is appropriately synchronized with the display, then use Choreographer.PostFrameCallback(.IFrameCallback).
  • ... and that's about it.

The choreographer receives timing pulses (such as vertical synchronization) from the display subsystem then schedules work to occur as part of rendering the next display frame.

Applications typically interact with the choreographer indirectly using higher level abstractions in the animation framework or the view hierarchy. Here are some examples of things you can do using the higher-level APIs.

However, there are a few cases where you might want to use the functions of the choreographer directly in your application. Here are some examples.

Each Looper thread has its own choreographer. Other threads can post callbacks to run on the choreographer but they will run on the Looper to which the choreographer belongs.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16

The members of Android.Views.Choreographer are listed below.

See Also: Object

Public Properties

[read-only]
static
InstanceChoreographer. Gets the choreographer for the calling thread.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

PostFrameCallback(Choreographer+IFrameCallback)
Posts a frame callback to run on the next frame.
PostFrameCallbackDelayed(Choreographer+IFrameCallback, Int64)
Posts a frame callback to run on the next frame after the specified delay.
RemoveFrameCallback(Choreographer+IFrameCallback)
Removes a previously posted frame callback.