Udostępnij za pośrednictwem


UiAutomation.GetWindowContentFrameStats(Int32) Method

Definition

Gets the frame statistics for a given window.

[Android.Runtime.Register("getWindowContentFrameStats", "(I)Landroid/view/WindowContentFrameStats;", "")]
public Android.Views.WindowContentFrameStats? GetWindowContentFrameStats (int windowId);
[<Android.Runtime.Register("getWindowContentFrameStats", "(I)Landroid/view/WindowContentFrameStats;", "")>]
member this.GetWindowContentFrameStats : int -> Android.Views.WindowContentFrameStats

Parameters

windowId
Int32

The window id.

Returns

The window frame statistics, or null if the window is not present.

Attributes

Remarks

Gets the frame statistics for a given window. These statistics contain information about the most recently rendered content frames.

A typical usage requires clearing the window frame statistics via #clearWindowContentFrameStats(int) followed by an interaction with the UI and finally getting the window frame statistics via calling this method.

// Assume we have at least one window.
            final int windowId = getWindows().get(0).getId();

            // Start with a clean slate.
            uiAutimation.clearWindowContentFrameStats(windowId);

            // Do stuff with the UI.

            // Get the frame statistics.
            WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId);

Java documentation for android.app.UiAutomation.getWindowContentFrameStats(int).

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

See also