Window Window Class

Definition

Abstract base class for a top-level window look and behavior policy.

[Android.Runtime.Register("android/view/Window", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class Window : Java.Lang.Object
type Window = class
    inherit Object
Inheritance
Derived
Attributes

Remarks

Android platform documentation

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.

Constructors

Window(Context) Window(Context)
Window(IntPtr, JniHandleOwnership) Window(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

DecorCaptionShadeAuto DecorCaptionShadeAuto
DecorCaptionShadeDark DecorCaptionShadeDark
DecorCaptionShadeLight DecorCaptionShadeLight
IdAndroidContent IdAndroidContent

The ID that the main layout in the XML layout file should have.

NavigationBarBackgroundTransitionName NavigationBarBackgroundTransitionName

The transitionName for the navigation bar background View when a custom background is used.

ProgressEnd ProgressEnd

Ending value for the (primary) progress

ProgressIndeterminateOff ProgressIndeterminateOff

Flag for setting the progress bar's indeterminate mode off

ProgressIndeterminateOn ProgressIndeterminateOn

Flag for setting the progress bar's indeterminate mode on

ProgressSecondaryEnd ProgressSecondaryEnd

Highest possible value for the secondary progress

ProgressSecondaryStart ProgressSecondaryStart

Lowest possible value for the secondary progress

ProgressStart ProgressStart

Starting value for the (primary) progress

ProgressVisibilityOff ProgressVisibilityOff

Flag for setting the progress bar's visibility to GONE

ProgressVisibilityOn ProgressVisibilityOn

Flag for setting the progress bar's visibility to VISIBLE

StatusBarBackgroundTransitionName StatusBarBackgroundTransitionName

The transitionName for the status bar background View when a custom background is used.

Properties

AllowEnterTransitionOverlap AllowEnterTransitionOverlap

Returns how the transition set in EnterTransition overlaps with the exit transition of the calling Activity.

AllowReturnTransitionOverlap AllowReturnTransitionOverlap

Returns how the transition set in ExitTransition overlaps with the exit transition of the called Activity when reentering after if finishes.

Attributes Attributes

Retrieve the current window attributes associated with this panel.

Callback Callback

Return the current Callback interface for this window.

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
ColorMode ColorMode
Container Container

Return the container for this Window.

ContentScene ContentScene

Retrieve the Scene representing this window's current content.

Context Context

Return the Context this window policy is running in, for retrieving resources and other information.

CurrentFocus CurrentFocus

Return the view in this Window that currently has focus, or null if there are none.

DecorView DecorView

Retrieve the top-level window decor view (containing the standard window frame/decorations and the client's content inside of that), which can be added as a window to the window manager.

EnterTransition EnterTransition

Returns the transition used to move Views into the initial scene.

ExitTransition ExitTransition

Returns the Transition that will be used to move Views out of the scene when starting a new Activity.

Features Features

Return the feature bits that are enabled.

ForcedWindowFlags ForcedWindowFlags

Return the window flags that have been explicitly set by the client, so will not be modified by DecorView.

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasChildren HasChildren
HasSoftInputMode HasSoftInputMode

Has the app specified their own soft input mode?

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsActive IsActive
IsFloating IsFloating

Return whether this window is being displayed with a floating style (based on the WindowIsFloating attribute in the style/theme).

IsWideColorGamut IsWideColorGamut
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
LayoutInflater LayoutInflater

Quick access to the LayoutInflater instance that this Window retrieved from its Context.

LocalFeatures LocalFeatures

Return the feature bits that are being implemented by this Window.

MediaController MediaController

Gets the MediaController that was previously set.

NavigationBarColor NavigationBarColor
PeerReference PeerReference Inherited from Object
ReenterTransition ReenterTransition

Returns the Transition that will be used to move Views in to the scene when returning from a previously-started Activity.

ReturnTransition ReturnTransition

Returns he Transition that will be used to move Views out of the scene when the Window is preparing to close, for example after a call to FinishAfterTransition().

SharedElementEnterTransition SharedElementEnterTransition

Returns the Transition that will be used for shared elements transferred into the content Scene.

SharedElementExitTransition SharedElementExitTransition

Returns the Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window.

SharedElementReenterTransition SharedElementReenterTransition

Returns the Transition that will be used for shared elements reentering from a started Activity after it has returned the shared element to it start location.

SharedElementReturnTransition SharedElementReturnTransition

Returns the Transition that will be used for shared elements transferred back to a calling Activity.

SharedElementsUseOverlay SharedElementsUseOverlay

Returns true when shared elements should use an Overlay during shared element transitions or false when they should animate as part of the normal View hierarchy.

StatusBarColor StatusBarColor
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TransitionBackgroundFadeDuration TransitionBackgroundFadeDuration

Returns the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition.

TransitionManager TransitionManager

Retrieve the TransitionManager responsible for for default transitions in this window.

VolumeControlStream VolumeControlStream
WindowManager WindowManager

Return the window manager allowing this Window to display its own windows.

WindowStyle WindowStyle

R styleable Window

Methods

AddContentView(View, ViewGroup+LayoutParams) AddContentView(View, ViewGroup+LayoutParams)

M:Android.Views.Window.SetContentView(Android.Views.View,.LayoutParams)

AddFlags(WindowManagerFlags) AddFlags(WindowManagerFlags)

Convenience function to set the flag bits as specified in flags, as per SetFlags(WindowManagerFlags, WindowManagerFlags).

AddOnFrameMetricsAvailableListener(Window+IOnFrameMetricsAvailableListener, Handler) AddOnFrameMetricsAvailableListener(Window+IOnFrameMetricsAvailableListener, Handler)
ClearFlags(WindowManagerFlags) ClearFlags(WindowManagerFlags)

Convenience function to clear the flag bits as specified in flags, as per SetFlags(WindowManagerFlags, WindowManagerFlags).

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CloseAllPanels() CloseAllPanels()
ClosePanel(Int32) ClosePanel(Int32)
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
FindViewById(Int32) FindViewById(Int32)

Finds a view that was identified by the id attribute from the XML that was processed in OnCreate(Bundle).

FindViewById<T>(Int32) FindViewById<T>(Int32)
GetDefaultFeatures(Context) GetDefaultFeatures(Context)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
HasFeature(WindowFeatures) HasFeature(WindowFeatures)

Query for the availability of a certain feature.

InjectInputEvent(InputEvent) InjectInputEvent(InputEvent)

Inject an event to window locally.

InvalidatePanelMenu(WindowFeatures) InvalidatePanelMenu(WindowFeatures)
IsShortcutKey(Keycode, KeyEvent) IsShortcutKey(Keycode, KeyEvent)

Is a keypress one of the defined shortcut keys for this window.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
MakeActive() MakeActive()
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
OnActive() OnActive()
OnConfigurationChanged(Configuration) OnConfigurationChanged(Configuration)

Should be called when the configuration is changed.

OpenPanel(Int32, KeyEvent) OpenPanel(Int32, KeyEvent)
PeekDecorView() PeekDecorView()

Retrieve the current decor view, but only if it has already been created; otherwise returns null.

PerformContextMenuIdentifierAction(Int32, MenuPerformFlags) PerformContextMenuIdentifierAction(Int32, MenuPerformFlags)
PerformPanelIdentifierAction(Int32, Int32, MenuPerformFlags) PerformPanelIdentifierAction(Int32, Int32, MenuPerformFlags)
PerformPanelShortcut(Int32, Keycode, KeyEvent, MenuPerformFlags) PerformPanelShortcut(Int32, Keycode, KeyEvent, MenuPerformFlags)
RemoveOnFrameMetricsAvailableListener(Window+IOnFrameMetricsAvailableListener) RemoveOnFrameMetricsAvailableListener(Window+IOnFrameMetricsAvailableListener)
RequestFeature(WindowFeatures) RequestFeature(WindowFeatures)

Enable extended screen features.

RestoreHierarchyState(Bundle) RestoreHierarchyState(Bundle)
SaveHierarchyState() SaveHierarchyState()
SetBackgroundDrawable(Drawable) SetBackgroundDrawable(Drawable)

Change the background of this window to a custom Drawable.

SetBackgroundDrawableResource(Int32) SetBackgroundDrawableResource(Int32)

Change the background of this window to a Drawable resource.

SetChildDrawable(Int32, Drawable) SetChildDrawable(Int32, Drawable)
SetChildInt(Int32, Int32) SetChildInt(Int32, Int32)
SetClipToOutline(Boolean) SetClipToOutline(Boolean)
SetContentView(Int32) SetContentView(Int32)

M:Android.Views.Window.SetContentView(Android.Views.View,.LayoutParams)

SetContentView(View) SetContentView(View)

M:Android.Views.Window.SetContentView(Android.Views.View,.LayoutParams)

SetContentView(View, ViewGroup+LayoutParams) SetContentView(View, ViewGroup+LayoutParams)

Set the screen content to an explicit view.

SetDecorCaptionShade(DecorCaptionShade) SetDecorCaptionShade(DecorCaptionShade)
SetDefaultWindowFormat(Int32) SetDefaultWindowFormat(Int32)

Set the default format of window, as per the PixelFormat types.

SetDimAmount(Single) SetDimAmount(Single)

Android.Views.WindowManagerLayoutParams.FLAG_DIM_BEHIND

SetElevation(Single) SetElevation(Single)
SetFeatureDrawable(WindowFeatures, Drawable) SetFeatureDrawable(WindowFeatures, Drawable)

Set an explicit Drawable value for feature of this window.

SetFeatureDrawableAlpha(WindowFeatures, Int32) SetFeatureDrawableAlpha(WindowFeatures, Int32)

Set a custom alpha value for the given drawable feature, controlling how much the background is visible through it.

SetFeatureDrawableResource(WindowFeatures, Int32) SetFeatureDrawableResource(WindowFeatures, Int32)

Set the value for a drawable feature of this window, from a resource identifier.

SetFeatureDrawableUri(WindowFeatures, Uri) SetFeatureDrawableUri(WindowFeatures, Uri)

Set the value for a drawable feature of this window, from a URI.

SetFeatureInt(WindowFeatures, Int32) SetFeatureInt(WindowFeatures, Int32)

Set the integer value for a feature.

SetFlags(WindowManagerFlags, WindowManagerFlags) SetFlags(WindowManagerFlags, WindowManagerFlags)

Set the flags of the window, as per the WindowManagerLayoutParams flags.

SetFormat(Format) SetFormat(Format)

Set the format of window, as per the PixelFormat types.

SetGravity(GravityFlags) SetGravity(GravityFlags)

Set the gravity of the window, as per the Gravity constants.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetIcon(Int32) SetIcon(Int32)

Set the primary icon for this window.

SetLayout(Int32, Int32) SetLayout(Int32, Int32)

Set the width and height layout parameters of the window.

SetLocalFocus(Boolean, Boolean) SetLocalFocus(Boolean, Boolean)

Set focus locally.

SetLogo(Int32) SetLogo(Int32)

Set the logo for this window.

SetNavigationBarColor(Color) SetNavigationBarColor(Color)
SetResizingCaptionDrawable(Drawable) SetResizingCaptionDrawable(Drawable)
SetRestrictedCaptionAreaListener(Window+IOnRestrictedCaptionAreaChangedListener) SetRestrictedCaptionAreaListener(Window+IOnRestrictedCaptionAreaChangedListener)
SetSoftInputMode(SoftInput) SetSoftInputMode(SoftInput)

Specify an explicit soft input mode to use for the window, as per SoftInputMode.

SetStatusBarColor(Color) SetStatusBarColor(Color)
SetSustainedPerformanceMode(Boolean) SetSustainedPerformanceMode(Boolean)
SetTitle(ICharSequence) SetTitle(ICharSequence)
SetTitle(String) SetTitle(String)
SetTitleColor(Color) SetTitleColor(Color)
SetType(WindowManagerTypes) SetType(WindowManagerTypes)

Set the type of the window, as per the WindowManager.

SetUiOptions(UiOptions) SetUiOptions(UiOptions)

Set extra options that will influence the UI for this window.

SetUiOptions(UiOptions, UiOptions) SetUiOptions(UiOptions, UiOptions)

Set extra options that will influence the UI for this window.

SetWindowAnimations(Int32) SetWindowAnimations(Int32)

Specify custom animations to use for the window, as per WindowAnimations.

SetWindowManager(IWindowManager, IBinder, String) SetWindowManager(IWindowManager, IBinder, String)

Set the window manager for use by this Window to, for example, display panels.

SetWindowManager(IWindowManager, IBinder, String, Boolean) SetWindowManager(IWindowManager, IBinder, String, Boolean)

Set the window manager for use by this Window to, for example, display panels.

SuperDispatchGenericMotionEvent(MotionEvent) SuperDispatchGenericMotionEvent(MotionEvent)

Used by custom windows, such as Dialog, to pass the generic motion event further down the view hierarchy.

SuperDispatchKeyEvent(KeyEvent) SuperDispatchKeyEvent(KeyEvent)

Used by custom windows, such as Dialog, to pass the key press event further down the view hierarchy.

SuperDispatchKeyShortcutEvent(KeyEvent) SuperDispatchKeyShortcutEvent(KeyEvent)

Used by custom windows, such as Dialog, to pass the key shortcut press event further down the view hierarchy.

SuperDispatchTouchEvent(MotionEvent) SuperDispatchTouchEvent(MotionEvent)

Used by custom windows, such as Dialog, to pass the touch screen event further down the view hierarchy.

SuperDispatchTrackballEvent(MotionEvent) SuperDispatchTrackballEvent(MotionEvent)

Used by custom windows, such as Dialog, to pass the trackball event further down the view hierarchy.

TakeInputQueue(InputQueue+ICallback) TakeInputQueue(InputQueue+ICallback)

Take ownership of this window's InputQueue.

TakeKeyEvents(Boolean) TakeKeyEvents(Boolean)

Request that key events come to this activity.

TakeSurface(ISurfaceHolderCallback2) TakeSurface(ISurfaceHolderCallback2)

Take ownership of this window's surface.

ToArray<T>() ToArray<T>() Inherited from Object
TogglePanel(Int32, KeyEvent) TogglePanel(Int32, KeyEvent)
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Events

RestrictedCaptionArea RestrictedCaptionArea

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to