語言

WallpaperService.Engine.DisplayContext 屬性

定義

Context資源與桌布目前顯示相符。

public virtual Android.Content.Context? DisplayContext { [Android.Runtime.Register("getDisplayContext", "()Landroid/content/Context;", "GetGetDisplayContextHandler", ApiSince=29)] get; }
[<get: Android.Runtime.Register("getDisplayContext", "()Landroid/content/Context;", "GetGetDisplayContextHandler", ApiSince=29)>]
member this.DisplayContext : Android.Content.Context

屬性值

A Context 代表當前顯示。

屬性

備註

Context資源與桌布目前顯示相符。 對於多顯示器環境,可以建立多個引擎來在每個顯示器上渲染,但這些顯示器的密度可能不同。 利用這個上下文取得當前顯示所需的相應資源,避免使用服務上下文。

顯示上下文永遠不會在被呼叫之後null出現Engine#onCreate(SurfaceHolder)。

Java 文件 android.service.wallpaper.WallpaperService.Engine.getDisplayContext()。

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

適用於