語言

Display.FrameRateVelocityMapping 屬性

定義

取得框架設定中定義的 View 幀率/速度映射規範。

public virtual System.Collections.Generic.IList<Android.Views.FrameRateVelocityPoint> FrameRateVelocityMapping { [Android.Runtime.Register("getFrameRateVelocityMapping", "()Ljava/util/List;", "GetGetFrameRateVelocityMappingHandler", ApiSince=37)] get; }
[<get: Android.Runtime.Register("getFrameRateVelocityMapping", "()Ljava/util/List;", "GetGetFrameRateVelocityMappingHandler", ApiSince=37)>]
member this.FrameRateVelocityMapping : System.Collections.Generic.IList<Android.Views.FrameRateVelocityPoint>

屬性值

一個只讀且非空的 FrameRateVelocityPoint 物件清單,代表該映射。

屬性

備註

取得框架設定中定義的 View 幀率/速度映射規範。 例如,每秒 120 幀 / 每秒 300 dp(與密度無關的像素)

這主要是為了在 RecyclerView、ScrollView、AbsListView 和 NestedScrollView 等元件中切換使用情境。 當內容速度很高時,需要更高的幀率以確保流暢度;反之,當速度低時,可以使用較低的幀率。

這些值是針對這個顯示實例特有的。 如果您的應用程式移動到不同的顯示器(例如在摺疊裝置的內外螢幕間切換),您必須從與目前渲染內容的視窗相關的顯示物件查詢這些值。

每當呼叫 DisplayListener#onDisplayChanged 時,需重新查詢映射值以確保資料一致性。 這對應於 DisplayManager#EVENT_FLAG_DISPLAY_CHANGED 事件。

Android 參考資料。android.view.Display.getFrameRateVelocityMapping

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於