UiAutomation.GetWindowContentFrameStats(Int32) 方法

定义

获取给定窗口的帧统计信息。

[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

参数

windowId
Int32

窗口 ID。

返回

窗口帧统计信息;如果窗口不存在,则为 null。

属性

注解

获取给定窗口的帧统计信息。 这些统计信息包含有关最近呈现的内容帧的信息。

典型用法需要通过与 #clearWindowContentFrameStats(int) UI 交互,最后通过调用此方法获取窗口帧统计信息来清除窗口帧统计信息。

// 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);

适用于 . 的 android.app.UiAutomation.getWindowContentFrameStats(int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

另请参阅