다음을 통해 공유


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 activity embedding 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.

PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected

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

PropertyCompatAllowMinAspectRatioOverride

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 changes the min aspect ratio.

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.

PropertyCompatAllowResizeableActivityOverrides

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 overrides that change the resizability of the app.

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 the android.view.View View API.

PropertyCompatAllowSmallCoverScreen

Application or Activity level android.content.pm.PackageManager.Property PackageManager.Property to provide any preferences for showing all or specific Activities on small cover displays of foldable style devices.

PropertyCompatAllowUserAspectRatioFullscreenOverride

Application level android.content.pm.PackageManager.Property PackageManager.Property tag that (when set to false) informs the system the app has opted out of the full-screen option of the user aspect ratio compatibility override settings.

PropertyCompatAllowUserAspectRatioOverride

Application level android.content.pm.PackageManager.Property PackageManager.Property tag that (when set to false) informs the system the app has opted out of the user-facing aspect ratio compatibility override.

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 Activity#setRequestedOrientation() loops.

PropertySupportsMultiInstanceSystemUi

Activity or Application level android.content.pm.PackageManager.Property PackageManager.Property for an app to declare that System UI should be shown for this app/component to allow it to be launched as multiple instances.

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.

AddScreenRecordingCallback(IExecutor, IConsumer)

Adds a screen recording callback.

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)
RegisterBatchedSurfaceControlInputReceiver(InputTransferToken, SurfaceControl, Choreographer, ISurfaceControlInputReceiver)

Registers a SurfaceControlInputReceiver for a SurfaceControl that will receive batched input event.

RegisterTrustedPresentationListener(IBinder, TrustedPresentationThresholds, IExecutor, IConsumer)

Sets a callback to receive feedback about the presentation of a Window.

RegisterUnbatchedSurfaceControlInputReceiver(InputTransferToken, SurfaceControl, Looper, ISurfaceControlInputReceiver)

Registers a SurfaceControlInputReceiver for a SurfaceControl that will receive every input event.

RemoveCrossWindowBlurEnabledListener(IConsumer)

Removes a listener, previously added with #addCrossWindowBlurEnabledListener

RemoveProposedRotationListener(IIntConsumer)

Removes a listener, previously added with #addProposedRotationListener.

RemoveScreenRecordingCallback(IConsumer)

Removes a screen recording callback.

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)
TransferTouchGesture(InputTransferToken, InputTransferToken)

Transfer the currently in progress touch gesture from the transferFromToken to the transferToToken.

UnregisterFromRuntime()

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

(Inherited from IJavaPeerable)
UnregisterSurfaceControlInputReceiver(SurfaceControl)

Unregisters and cleans up the registered SurfaceControlInputReceiver for the specified token.

UnregisterTrustedPresentationListener(IConsumer)

Removes a presentation listener associated with a window.

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

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to