Freigeben über


ViewTreeObserver.RegisterFrameCommitCallback(IRunnable) Method

Definition

Adds a frame commit callback.

[Android.Runtime.Register("registerFrameCommitCallback", "(Ljava/lang/Runnable;)V", "", ApiSince=29)]
public void RegisterFrameCommitCallback (Java.Lang.IRunnable callback);
[<Android.Runtime.Register("registerFrameCommitCallback", "(Ljava/lang/Runnable;)V", "", ApiSince=29)>]
member this.RegisterFrameCommitCallback : Java.Lang.IRunnable -> unit

Parameters

callback
IRunnable

The callback to invoke when the frame is committed.

Attributes

Remarks

Adds a frame commit callback. This callback will be invoked when the current rendering content has been rendered into a frame and submitted to the swap chain. The frame may not currently be visible on the display when this is invoked, but it has been submitted. This callback is useful in combination with PixelCopy to capture the current rendered content of the UI reliably.

Note: Only works with hardware rendering. Does nothing otherwise.

Java documentation for android.view.ViewTreeObserver.registerFrameCommitCallback(java.lang.Runnable).

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