WallpaperService.Engine.DisplayContext Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Context
with resources that match the current display the wallpaper is on.
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
Property Value
A Context
for current display.
- Attributes
Remarks
The Context
with resources that match the current display the wallpaper is on. For multiple display environment, multiple engines can be created to render on each display, but these displays may have different densities. Use this context to get the corresponding resources for currently display, avoiding the context of the service.
The display context will never be null
after Engine#onCreate(SurfaceHolder)
has been called.
Java documentation for android.service.wallpaper.WallpaperService.Engine.getDisplayContext()
.
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.