Udostępnij za pośrednictwem


IWindowManager Interface

Definition

The interface that apps use to talk to the window manager.

[Android.Runtime.Register("android/view/WindowManager", "", "Android.Views.IWindowManagerInvoker")]
public interface IWindowManager : Android.Views.IViewManager, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/WindowManager", "", "Android.Views.IWindowManagerInvoker")>]
type IWindowManager = interface
    interface IViewManager
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

The interface that apps use to talk to the window manager.

Each window manager instance is bound to a Display. To obtain the WindowManager associated with a display, call Context#createWindowContext(Display, int, Bundle) to get the display's UI context, then call Context#getSystemService(String) or Context#getSystemService(Class) on the UI context.

The simplest way to show a window on a particular display is to create a Presentation, which automatically obtains a WindowManager and context for the display.

Java documentation for android.view.WindowManager.

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.

Fields

PropertyActivityEmbeddingAllowSystemOverride

Application-level android.content.pm.PackageManager.Property PackageManager.Property tag that specifies whether OEMs are permitted to provide activity embedding split-rule configurations on behalf of the app.

PropertyActivityEmbeddingSplitsEnabled

Application level android.content.pm.PackageManager.Property PackageManager .Property that an app can specify to inform the system that the app is ActivityEmbedding split feature enabled.

PropertyCameraCompatAllowForceRotation

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be excluded from the camera compatibility force rotation treatment.

PropertyCameraCompatAllowRefresh

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be excluded from the activity "refresh" after the camera compatibility force rotation treatment.

PropertyCameraCompatEnableRefreshViaPause

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the activity should be or shouldn't be "refreshed" after the camera compatibility force rotation treatment using "paused -> resumed" cycle rather than "stopped -> resumed".

PropertyCompatAllowDisplayOrientationOverride

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be opted-out from the compatibility override that fixes display orientation to landscape natural orientation when an activity is fullscreen.

PropertyCompatAllowOrientationOverride

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be excluded from the compatibility override for orientation set by the device manufacturer.

PropertyCompatAllowSandboxingViewBoundsApis

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that it needs to be opted-out from the compatibility treatment that sandboxes android.view.View API.

PropertyCompatEnableFakeFocus

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the application can be opted-in or opted-out from the compatibility treatment that enables sending a fake focus event for unfocused resumed split screen activities.

PropertyCompatIgnoreRequestedOrientation

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app can be opted-in or opted-out from the compatibility treatment that avoids android.app.Activity#setRequestedOrientation loops.

Properties

CurrentWindowMetrics

Returns the WindowMetrics according to the current system state.

DefaultDisplay

Returns the Display upon which this IWindowManager instance will create new windows.

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsCrossWindowBlurEnabled

Returns whether cross-window blur is currently enabled.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
MaximumWindowMetrics

Returns the largest WindowMetrics an app may expect in the current system state.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

AddCrossWindowBlurEnabledListener(IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

AddCrossWindowBlurEnabledListener(IExecutor, IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

AddProposedRotationListener(IExecutor, IIntConsumer)

Adds a listener to start monitoring the proposed rotation of the current associated context.

AddView(View, ViewGroup+LayoutParams)

Assign the passed LayoutParams to the passed View and add the view to the window.

(Inherited from IViewManager)
Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
RemoveCrossWindowBlurEnabledListener(IConsumer)

Removes a listener, previously added with #addCrossWindowBlurEnabledListener

RemoveProposedRotationListener(IIntConsumer)

Removes a listener, previously added with #addProposedRotationListener.

RemoveView(View) (Inherited from IViewManager)
RemoveViewImmediate(View)

Special variation of #removeView that immediately invokes the given view hierarchy's View#onDetachedFromWindow() View.onDetachedFromWindow() methods before returning.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)
UpdateViewLayout(View, ViewGroup+LayoutParams) (Inherited from IViewManager)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to