# Print output for @column tags ?>
public
abstract
class
Window
extends Object
java.lang.Object | |
↳ | android.view.Window |
Abstract base class for a top-level window look and behavior policy. An instance of this class should be used as the top-level view added to the window manager. It provides standard UI policies such as a background, title area, default key processing, etc.
The only existing implementation of this abstract class is android.view.PhoneWindow, which you should instantiate when needing a Window.
Nested classes | |
---|---|
interface |
Window.Callback
API from a Window back to its caller. |
interface |
Window.OnFrameMetricsAvailableListener
Callback for clients that want frame timing information for each frame rendered by the Window. |
interface |
Window.OnRestrictedCaptionAreaChangedListener
Callback for clients that want to be aware of where caption draws content. |
XML attributes | |
---|---|
android:navigationBarColor |
The color for the navigation bar. |
android:navigationBarDividerColor |
Shows a thin line of the specified color between the navigation bar and the app content. |
android:windowAllowEnterTransitionOverlap |
Flag indicating whether this Window's transition should overlap with the exiting transition of the calling Activity. |
android:windowAllowReturnTransitionOverlap |
Flag indicating whether this Window's transition should overlap with the exiting transition of the called Activity when the called Activity finishes. |
android:windowContentTransitionManager |
Reference to a TransitionManager XML resource defining the desired transitions between different window content. |
android:windowEnterTransition |
Reference to a Transition XML resource defining the desired Transition used to move Views into the initial Window's content Scene. |
android:windowExitTransition |
Reference to a Transition XML resource defining the desired Transition used to move Views out of the Window's content Scene when launching a new Activity. |
android:windowReenterTransition |
Reference to a Transition XML resource defining the desired Transition used to move Views in to the scene when returning from a previously-started Activity. |
android:windowReturnTransition |
Reference to a Transition XML resource defining the desired Transition used to move Views out of the scene when the Window is preparing to close. |
android:windowSharedElementEnterTransition |
Reference to a Transition XML resource defining the desired Transition used to move shared elements transferred into the Window's initial content Scene. |
android:windowSharedElementExitTransition |
Reference to a Transition XML resource defining the desired Transition used when starting a new Activity to move shared elements prior to transferring to the called Activity. |
android:windowSharedElementReenterTransition |
Reference to a Transition XML resource defining the desired Transition used for shared elements transferred back to a calling Activity. |
android:windowSharedElementReturnTransition |
Reference to a Transition XML resource defining the desired Transition used to move shared elements transferred back to a calling Activity. |
android:windowSharedElementsUseOverlay |
Indicates whether or not shared elements should use an overlay during transitions. |
android:windowTransitionBackgroundFadeDuration |
The duration, in milliseconds, of the window background fade duration when transitioning into or away from an Activity when called with an Activity Transition. |
Constants | |
---|---|
int |
DECOR_CAPTION_SHADE_AUTO
Flag for letting the theme drive the color of the window caption controls. |
int |
DECOR_CAPTION_SHADE_DARK
Flag for setting dark-color controls on the window caption. |
int |
DECOR_CAPTION_SHADE_LIGHT
Flag for setting light-color controls on the window caption. |
int |
DEFAULT_FEATURES
This constant is deprecated.
use |
int |
FEATURE_ACTION_BAR
Flag for enabling the Action Bar. |
int |
FEATURE_ACTION_BAR_OVERLAY
Flag for requesting an Action Bar that overlays window content. |
int |
FEATURE_ACTION_MODE_OVERLAY
Flag for specifying the behavior of action modes when an Action Bar is not present. |
int |
FEATURE_ACTIVITY_TRANSITIONS
Enables Activities to run Activity Transitions either through sending or receiving
ActivityOptions bundle created with
|
int |
FEATURE_CONTENT_TRANSITIONS
Flag for requesting that window content changes should be animated using a TransitionManager. |
int |
FEATURE_CONTEXT_MENU
Flag for the context menu. |
int |
FEATURE_CUSTOM_TITLE
Flag for custom title. |
int |
FEATURE_INDETERMINATE_PROGRESS
This constant is deprecated. No longer supported starting in API 21. |
int |
FEATURE_LEFT_ICON
Flag for having an icon on the left side of the title bar |
int |
FEATURE_NO_TITLE
Flag for the "no title" feature, turning off the title at the top of the screen. |
int |
FEATURE_OPTIONS_PANEL
Flag for the "options panel" feature. |
int |
FEATURE_PROGRESS
This constant is deprecated. No longer supported starting in API 21. |
int |
FEATURE_RIGHT_ICON
Flag for having an icon on the right side of the title bar |
int |
FEATURE_SWIPE_TO_DISMISS
This constant is deprecated. Swipe-to-dismiss isn't functional anymore. |
int |
ID_ANDROID_CONTENT
The ID that the main layout in the XML layout file should have. |
String |
NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME
The transitionName for the navigation bar background View when a custom background is used. |
int |
PROGRESS_END
This constant is deprecated.
|
int |
PROGRESS_INDETERMINATE_OFF
This constant is deprecated.
|
int |
PROGRESS_INDETERMINATE_ON
This constant is deprecated.
|
int |
PROGRESS_SECONDARY_END
This constant is deprecated.
|
int |
PROGRESS_SECONDARY_START
This constant is deprecated.
|
int |
PROGRESS_START
This constant is deprecated.
|
int |
PROGRESS_VISIBILITY_OFF
This constant is deprecated.
|
int |
PROGRESS_VISIBILITY_ON
This constant is deprecated.
|
String |
STATUS_BAR_BACKGROUND_TRANSITION_NAME
The transitionName for the status bar background View when a custom background is used. |
Public constructors | |
---|---|
Window(Context context)
|
Public methods | |
---|---|
abstract
void
|
addContentView(View view, ViewGroup.LayoutParams params)
Variation on
|
void
|
addFlags(int flags)
Convenience function to set the flag bits as specified in flags, as
per |
final
void
|
addOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener, Handler handler)
Set an observer to collect frame stats for each frame rendered in this window. |
void
|
clearFlags(int flags)
Convenience function to clear the flag bits as specified in flags, as
per |
abstract
void
|
closeAllPanels()
|
abstract
void
|
closePanel(int featureId)
|
<T extends View>
T
|
findViewById(int id)
Finds a view that was identified by the |
boolean
|
getAllowEnterTransitionOverlap()
Returns how the transition set in
|
boolean
|
getAllowReturnTransitionOverlap()
Returns how the transition set in
|
final
WindowManager.LayoutParams
|
getAttributes()
Retrieve the current window attributes associated with this panel. |
final
Window.Callback
|
getCallback()
Return the current Callback interface for this window. |
int
|
getColorMode()
Returns the requested color mode of the window, one of
|
final
Window
|
getContainer()
Return the container for this Window. |
Scene
|
getContentScene()
Retrieve the |
final
Context
|
getContext()
Return the Context this window policy is running in, for retrieving resources and other information. |
abstract
View
|
getCurrentFocus()
Return the view in this Window that currently has focus, or null if there are none. |
abstract
View
|
getDecorView()
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. |
static
int
|
getDefaultFeatures(Context context)
Return the feature bits set by default on a window. |
Transition
|
getEnterTransition()
Returns the transition used to move Views into the initial scene. |
Transition
|
getExitTransition()
Returns the Transition that will be used to move Views out of the scene when starting a new Activity. |
WindowInsetsController
|
getInsetsController()
|
abstract
LayoutInflater
|
getLayoutInflater()
Quick access to the |
MediaController
|
getMediaController()
Gets the |
abstract
int
|
getNavigationBarColor()
|
int
|
getNavigationBarDividerColor()
Retrieves the color of the navigation bar divider. |
Transition
|
getReenterTransition()
Returns the Transition that will be used to move Views in to the scene when returning from a previously-started Activity. |
Transition
|
getReturnTransition()
Returns the 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
|
Transition
|
getSharedElementEnterTransition()
Returns the Transition that will be used for shared elements transferred into the content Scene. |
Transition
|
getSharedElementExitTransition()
Returns the Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window. |
Transition
|
getSharedElementReenterTransition()
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. |
Transition
|
getSharedElementReturnTransition()
Returns the Transition that will be used for shared elements transferred back to a calling Activity. |
boolean
|
getSharedElementsUseOverlay()
Returns |
abstract
int
|
getStatusBarColor()
|
List<Rect>
|
getSystemGestureExclusionRects()
Retrieve the list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures. |
long
|
getTransitionBackgroundFadeDuration()
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
|
getTransitionManager()
Retrieve the |
abstract
int
|
getVolumeControlStream()
|
WindowManager
|
getWindowManager()
Return the window manager allowing this Window to display its own windows. |
final
TypedArray
|
getWindowStyle()
Return the |
final
boolean
|
hasChildren()
|
boolean
|
hasFeature(int feature)
Query for the availability of a certain feature. |
void
|
injectInputEvent(InputEvent event)
Inject an event to window locally. |
abstract
void
|
invalidatePanelMenu(int featureId)
|
final
boolean
|
isActive()
|
abstract
boolean
|
isFloating()
Return whether this window is being displayed with a floating style
(based on the |
boolean
|
isNavigationBarContrastEnforced()
Returns whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. |
abstract
boolean
|
isShortcutKey(int keyCode, KeyEvent event)
Is a keypress one of the defined shortcut keys for this window. |
boolean
|
isStatusBarContrastEnforced()
Returns whether the system is ensuring that the status bar has enough contrast when a fully transparent background is requested. |
boolean
|
isWideColorGamut()
Returns true if this window's color mode is |
final
void
|
makeActive()
|
abstract
void
|
onConfigurationChanged(Configuration newConfig)
Should be called when the configuration is changed. |
abstract
void
|
openPanel(int featureId, KeyEvent event)
|
abstract
View
|
peekDecorView()
Retrieve the current decor view, but only if it has already been created; otherwise returns null. |
abstract
boolean
|
performContextMenuIdentifierAction(int id, int flags)
|
abstract
boolean
|
performPanelIdentifierAction(int featureId, int id, int flags)
|
abstract
boolean
|
performPanelShortcut(int featureId, int keyCode, KeyEvent event, int flags)
|
final
void
|
removeOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener)
Remove observer and stop listening to frame stats for this window. |
boolean
|
requestFeature(int featureId)
Enable extended screen features. |
final
<T extends View>
T
|
requireViewById(int id)
Finds a view that was identified by the |
abstract
void
|
restoreHierarchyState(Bundle savedInstanceState)
|
abstract
Bundle
|
saveHierarchyState()
|
void
|
setAllowEnterTransitionOverlap(boolean allow)
Controls how the transition set in
|
void
|
setAllowReturnTransitionOverlap(boolean allow)
Controls how the transition set in
|
void
|
setAttributes(WindowManager.LayoutParams a)
Specify custom window attributes. |
abstract
void
|
setBackgroundDrawable(Drawable drawable)
Change the background of this window to a custom Drawable. |
void
|
setBackgroundDrawableResource(int resId)
Change the background of this window to a Drawable resource. |
void
|
setCallback(Window.Callback callback)
Set the Callback interface for this window, used to intercept key events and other dynamic operations in the window. |
abstract
void
|
setChildDrawable(int featureId, Drawable drawable)
|
abstract
void
|
setChildInt(int featureId, int value)
|
void
|
setClipToOutline(boolean clipToOutline)
Sets whether window content should be clipped to the outline of the window background. |
void
|
setColorMode(int colorMode)
Sets the requested color mode of the window. |
void
|
setContainer(Window container)
Set the container for this window. |
abstract
void
|
setContentView(View view, ViewGroup.LayoutParams params)
Set the screen content to an explicit view. |
abstract
void
|
setContentView(View view)
Convenience for
|
abstract
void
|
setContentView(int layoutResID)
Convenience for
|
abstract
void
|
setDecorCaptionShade(int decorCaptionShade)
Set what color should the caption controls be. |
void
|
setDecorFitsSystemWindows(boolean decorFitsSystemWindows)
Sets whether the decor view should fit root-level content views for |
void
|
setDimAmount(float amount)
Set the amount of dim behind the window when using
|
void
|
setElevation(float elevation)
Sets the window elevation. |
void
|
setEnterTransition(Transition transition)
Sets the Transition that will be used to move Views into the initial scene. |
void
|
setExitTransition(Transition transition)
Sets the Transition that will be used to move Views out of the scene when starting a new Activity. |
abstract
void
|
setFeatureDrawable(int featureId, Drawable drawable)
Set an explicit Drawable value for feature of this window. |
abstract
void
|
setFeatureDrawableAlpha(int featureId, int alpha)
Set a custom alpha value for the given drawable feature, controlling how much the background is visible through it. |
abstract
void
|
setFeatureDrawableResource(int featureId, int resId)
Set the value for a drawable feature of this window, from a resource identifier. |
abstract
void
|
setFeatureDrawableUri(int featureId, Uri uri)
Set the value for a drawable feature of this window, from a URI. |
abstract
void
|
setFeatureInt(int featureId, int value)
Set the integer value for a feature. |
void
|
setFlags(int flags, int mask)
Set the flags of the window, as per the
|
void
|
setFormat(int format)
Set the format of window, as per the PixelFormat types. |
void
|
setGravity(int gravity)
Set the gravity of the window, as per the Gravity constants. |
void
|
setIcon(int resId)
Set the primary icon for this window. |
void
|
setLayout(int width, int height)
Set the width and height layout parameters of the window. |
void
|
setLocalFocus(boolean hasFocus, boolean inTouchMode)
Set focus locally. |
void
|
setLogo(int resId)
Set the logo for this window. |
void
|
setMediaController(MediaController controller)
Sets a |
abstract
void
|
setNavigationBarColor(int color)
Sets the color of the navigation bar to . |
void
|
setNavigationBarContrastEnforced(boolean enforceContrast)
Sets whether the system should ensure that the navigation bar has enough contrast when a fully transparent background is requested. |
void
|
setNavigationBarDividerColor(int dividerColor)
Shows a thin line of the specified color between the navigation bar and the app content. |
void
|
setPreferMinimalPostProcessing(boolean isPreferred)
If |
void
|
setReenterTransition(Transition transition)
Sets the Transition that will be used to move Views in to the scene when returning from a previously-started Activity. |
abstract
void
|
setResizingCaptionDrawable(Drawable drawable)
Set the drawable that is drawn underneath the caption during the resizing. |
final
void
|
setRestrictedCaptionAreaListener(Window.OnRestrictedCaptionAreaChangedListener listener)
Set a callback for changes of area where caption will draw its content. |
void
|
setReturnTransition(Transition transition)
Sets the 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
|
void
|
setSharedElementEnterTransition(Transition transition)
Sets the Transition that will be used for shared elements transferred into the content Scene. |
void
|
setSharedElementExitTransition(Transition transition)
Sets the Transition that will be used for shared elements after starting a new Activity before the shared elements are transferred to the called Activity. |
void
|
setSharedElementReenterTransition(Transition transition)
Sets 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. |
void
|
setSharedElementReturnTransition(Transition transition)
Sets the Transition that will be used for shared elements transferred back to a calling Activity. |
void
|
setSharedElementsUseOverlay(boolean sharedElementsUseOverlay)
Sets whether or not shared elements should use an Overlay during shared element transitions. |
void
|
setSoftInputMode(int mode)
Specify an explicit soft input mode to use for the window, as per
|
abstract
void
|
setStatusBarColor(int color)
Sets the color of the status bar to |
void
|
setStatusBarContrastEnforced(boolean ensureContrast)
Sets whether the system should ensure that the status bar has enough contrast when a fully transparent background is requested. |
void
|
setSustainedPerformanceMode(boolean enable)
|
void
|
setSystemGestureExclusionRects(List<Rect> rects)
Sets a list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures. |
abstract
void
|
setTitle(CharSequence title)
|
abstract
void
|
setTitleColor(int textColor)
|
void
|
setTransitionBackgroundFadeDuration(long fadeDurationMillis)
Sets the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition. |
void
|
setTransitionManager(TransitionManager tm)
Set the |
void
|
setType(int type)
Set the type of the window, as per the WindowManager.LayoutParams types. |
void
|
setUiOptions(int uiOptions)
Set extra options that will influence the UI for this window. |
void
|
setUiOptions(int uiOptions, int mask)
Set extra options that will influence the UI for this window. |
abstract
void
|
setVolumeControlStream(int streamType)
|
void
|
setWindowAnimations(int resId)
Specify custom animations to use for the window, as per
|
void
|
setWindowManager(WindowManager wm, IBinder appToken, String appName)
Set the window manager for use by this Window to, for example, display panels. |
void
|
setWindowManager(WindowManager wm, IBinder appToken, String appName, boolean hardwareAccelerated)
Set the window manager for use by this Window to, for example, display panels. |
abstract
boolean
|
superDispatchGenericMotionEvent(MotionEvent event)
Used by custom windows, such as Dialog, to pass the generic motion event further down the view hierarchy. |
abstract
boolean
|
superDispatchKeyEvent(KeyEvent event)
Used by custom windows, such as Dialog, to pass the key press event further down the view hierarchy. |
abstract
boolean
|
superDispatchKeyShortcutEvent(KeyEvent event)
Used by custom windows, such as Dialog, to pass the key shortcut press event further down the view hierarchy. |
abstract
boolean
|
superDispatchTouchEvent(MotionEvent event)
Used by custom windows, such as Dialog, to pass the touch screen event further down the view hierarchy. |
abstract
boolean
|
superDispatchTrackballEvent(MotionEvent event)
Used by custom windows, such as Dialog, to pass the trackball event further down the view hierarchy. |
abstract
void
|
takeInputQueue(InputQueue.Callback callback)
Take ownership of this window's InputQueue. |
abstract
void
|
takeKeyEvents(boolean get)
Request that key events come to this activity. |
abstract
void
|
takeSurface(SurfaceHolder.Callback2 callback)
Take ownership of this window's surface. |
abstract
void
|
togglePanel(int featureId, KeyEvent event)
|
Protected methods | |
---|---|
final
int
|
getFeatures()
Return the feature bits that are enabled. |
final
int
|
getForcedWindowFlags()
Return the window flags that have been explicitly set by the client,
so will not be modified by |
final
int
|
getLocalFeatures()
Return the feature bits that are being implemented by this Window. |
final
boolean
|
hasSoftInputMode()
Has the app specified their own soft input mode? |
abstract
void
|
onActive()
|
void
|
setDefaultWindowFormat(int format)
Set the default format of window, as per the PixelFormat types. |
Inherited methods | |
---|---|
The color for the navigation bar. If the color is not opaque, consider setting
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
and
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
.
For this to take effect, the window must be drawing the system bar backgrounds with
R.attr.windowDrawsSystemBarBackgrounds
and the navigation bar must not
have been requested to be translucent with
R.attr.windowTranslucentNavigation
.
Corresponds to Window.setNavigationBarColor(int)
.
May be a color value, in the form of "#rgb
",
"#argb
", "#rrggbb
", or
"#aarrggbb
".
Related methods:
Shows a thin line of the specified color between the navigation bar and the app content.
For this to take effect, the window must be drawing the system bar backgrounds with
R.attr.windowDrawsSystemBarBackgrounds
and the navigation bar must not
have been requested to be translucent with
R.attr.windowTranslucentNavigation
.
Corresponds to Window.setNavigationBarDividerColor(int)
.
May be a color value, in the form of "#rgb
",
"#argb
", "#rrggbb
", or
"#aarrggbb
".
Related methods:
Flag indicating whether this Window's transition should overlap with
the exiting transition of the calling Activity. Corresponds to
Window.setAllowEnterTransitionOverlap(boolean)
.
May be a boolean value, such as "true
" or
"false
".
Related methods:
Flag indicating whether this Window's transition should overlap with
the exiting transition of the called Activity when the called Activity
finishes. Corresponds to
Window.setAllowReturnTransitionOverlap(boolean)
.
May be a boolean value, such as "true
" or
"false
".
Related methods:
Reference to a TransitionManager XML resource defining the desired transitions between different window content.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move Views into the initial Window's content Scene. Corresponds to
Window.setEnterTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move Views out of the Window's content Scene when launching a new Activity.
Corresponds to
Window.setExitTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move Views in to the scene when returning from a previously-started Activity.
Corresponds to
Window.setReenterTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move Views out of the scene when the Window is
preparing to close. Corresponds to
Window.setReturnTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move shared elements transferred into the Window's initial content Scene.
Corresponds to Window.setSharedElementEnterTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used when starting a new Activity to move shared elements prior to transferring
to the called Activity.
Corresponds to Window.setSharedElementExitTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used for shared elements transferred back to a calling Activity.
Corresponds to Window.setSharedElementReenterTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Reference to a Transition XML resource defining the desired Transition
used to move shared elements transferred back to a calling Activity.
Corresponds to Window.setSharedElementReturnTransition(android.transition.Transition)
.
May be a reference to another resource, in the form
"@[+][package:]type/name
" or a theme
attribute in the form
"?[package:]type/name
".
Related methods:
Indicates whether or not shared elements should use an overlay during transitions. The default value is true.
May be a boolean value, such as "true
" or
"false
".
Related methods:
The duration, in milliseconds, of the window background fade duration
when transitioning into or away from an Activity when called with an
Activity Transition. Corresponds to
Window.setTransitionBackgroundFadeDuration(long)
.
May be an integer value, such as "100
".
Related methods:
public static final int DECOR_CAPTION_SHADE_AUTO
Flag for letting the theme drive the color of the window caption controls. Use with
setDecorCaptionShade(int)
. This is the default value.
Constant Value: 0 (0x00000000)
public static final int DECOR_CAPTION_SHADE_DARK
Flag for setting dark-color controls on the window caption. Use with
setDecorCaptionShade(int)
.
Constant Value: 2 (0x00000002)
public static final int DECOR_CAPTION_SHADE_LIGHT
Flag for setting light-color controls on the window caption. Use with
setDecorCaptionShade(int)
.
Constant Value: 1 (0x00000001)
protected static final int DEFAULT_FEATURES
This constant is deprecated.
use getDefaultFeatures(android.content.Context)
instead.
The default features enabled.
Constant Value: 65 (0x00000041)
public static final int FEATURE_ACTION_BAR
Flag for enabling the Action Bar. This is enabled by default for some devices. The Action Bar replaces the title bar and provides an alternate location for an on-screen menu button on some devices.
Constant Value: 8 (0x00000008)
public static final int FEATURE_ACTION_BAR_OVERLAY
Flag for requesting an Action Bar that overlays window content.
Normally an Action Bar will sit in the space above window content, but if this
feature is requested along with FEATURE_ACTION_BAR
it will be layered over
the window content itself. This is useful if you would like your app to have more control
over how the Action Bar is displayed, such as letting application content scroll beneath
an Action Bar with a transparent background or otherwise displaying a transparent/translucent
Action Bar over application content.
This mode is especially useful with View#SYSTEM_UI_FLAG_FULLSCREEN
, which allows you to seamlessly hide the
action bar in conjunction with other screen decorations.
As of Build.VERSION_CODES.JELLY_BEAN
, when an
ActionBar is in this mode it will adjust the insets provided to
View#fitSystemWindows(android.graphics.Rect)
to include the content covered by the action bar, so you can do layout within
that space.
Constant Value: 9 (0x00000009)
public static final int FEATURE_ACTION_MODE_OVERLAY
Flag for specifying the behavior of action modes when an Action Bar is not present. If overlay is enabled, the action mode UI will be allowed to cover existing window content.
Constant Value: 10 (0x0000000a)
public static final int FEATURE_ACTIVITY_TRANSITIONS
Enables Activities to run Activity Transitions either through sending or receiving
ActivityOptions bundle created with
ActivityOptions.makeSceneTransitionAnimation(android.app.Activity, android.util.Pair[])
or ActivityOptions.makeSceneTransitionAnimation(android.app.Activity, View, String)
.
Constant Value: 13 (0x0000000d)
public static final int FEATURE_CONTENT_TRANSITIONS
Flag for requesting that window content changes should be animated using a TransitionManager.
The TransitionManager is set using
setTransitionManager(android.transition.TransitionManager)
. If none is set,
a default TransitionManager will be used.
See also:
Constant Value: 12 (0x0000000c)
public static final int FEATURE_CONTEXT_MENU
Flag for the context menu. This is enabled by default.
Constant Value: 6 (0x00000006)
public static final int FEATURE_CUSTOM_TITLE
Flag for custom title. You cannot combine this feature with other title features.
Constant Value: 7 (0x00000007)
public static final int FEATURE_INDETERMINATE_PROGRESS
This constant is deprecated.
No longer supported starting in API 21.
Flag for indeterminate progress.
Constant Value: 5 (0x00000005)
public static final int FEATURE_LEFT_ICON
Flag for having an icon on the left side of the title bar
Constant Value: 3 (0x00000003)
public static final int FEATURE_NO_TITLE
Flag for the "no title" feature, turning off the title at the top of the screen.
Constant Value: 1 (0x00000001)
public static final int FEATURE_OPTIONS_PANEL
Flag for the "options panel" feature. This is enabled by default.
Constant Value: 0 (0x00000000)
public static final int FEATURE_PROGRESS
This constant is deprecated.
No longer supported starting in API 21.
Flag for the progress indicator feature.
Constant Value: 2 (0x00000002)
public static final int FEATURE_RIGHT_ICON
Flag for having an icon on the right side of the title bar
Constant Value: 4 (0x00000004)
public static final int FEATURE_SWIPE_TO_DISMISS
This constant is deprecated.
Swipe-to-dismiss isn't functional anymore.
Flag for requesting a decoration-free window that is dismissed by swiping from the left.
Constant Value: 11 (0x0000000b)
public static final int ID_ANDROID_CONTENT
The ID that the main layout in the XML layout file should have.
Constant Value: 16908290 (0x01020002)
public static final String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME
The transitionName for the navigation bar background View when a custom background is used.
See also:
Constant Value: "android:navigation:background"
public static final int PROGRESS_END
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Ending value for the (primary) progress.
Constant Value: 10000 (0x00002710)
public static final int PROGRESS_INDETERMINATE_OFF
This constant is deprecated.
FEATURE_INDETERMINATE_PROGRESS
and related methods
are no longer supported starting in API 21.
Flag for setting the progress bar's indeterminate mode off.
Constant Value: -4 (0xfffffffc)
public static final int PROGRESS_INDETERMINATE_ON
This constant is deprecated.
FEATURE_INDETERMINATE_PROGRESS
and related methods
are no longer supported starting in API 21.
Flag for setting the progress bar's indeterminate mode on.
Constant Value: -3 (0xfffffffd)
public static final int PROGRESS_SECONDARY_END
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Highest possible value for the secondary progress.
Constant Value: 30000 (0x00007530)
public static final int PROGRESS_SECONDARY_START
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Lowest possible value for the secondary progress.
Constant Value: 20000 (0x00004e20)
public static final int PROGRESS_START
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Starting value for the (primary) progress.
Constant Value: 0 (0x00000000)
public static final int PROGRESS_VISIBILITY_OFF
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Flag for setting the progress bar's visibility to GONE.
Constant Value: -2 (0xfffffffe)
public static final int PROGRESS_VISIBILITY_ON
This constant is deprecated.
FEATURE_PROGRESS
and related methods are no longer
supported starting in API 21.
Flag for setting the progress bar's visibility to VISIBLE.
Constant Value: -1 (0xffffffff)
public static final String STATUS_BAR_BACKGROUND_TRANSITION_NAME
The transitionName for the status bar background View when a custom background is used.
See also:
Constant Value: "android:status:background"
public abstract void addContentView (View view, ViewGroup.LayoutParams params)
Variation on
setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
to add an additional content view to the screen. Added after any existing
ones in the screen -- existing views are NOT removed.
Parameters | |
---|---|
view |
View : The desired content to display. |
params |
ViewGroup.LayoutParams : Layout parameters for the view. |
public void addFlags (int flags)
Convenience function to set the flag bits as specified in flags, as
per setFlags(int, int)
.
Parameters | |
---|---|
flags |
int : The flag bits to be set. |
See also:
public final void addOnFrameMetricsAvailableListener (Window.OnFrameMetricsAvailableListener listener, Handler handler)
Set an observer to collect frame stats for each frame rendered in this window. Must be in hardware rendering mode.
Parameters | |
---|---|
listener |
Window.OnFrameMetricsAvailableListener : This value cannot be null . |
handler |
Handler |
public void clearFlags (int flags)
Convenience function to clear the flag bits as specified in flags, as
per setFlags(int, int)
.
Parameters | |
---|---|
flags |
int : The flag bits to be cleared. |
See also:
public abstract void closeAllPanels ()
public abstract void closePanel (int featureId)
Parameters | |
---|---|
featureId |
int |
public T findViewById (int id)
Finds a view that was identified by the android:id
XML attribute
that was processed in Activity.onCreate(Bundle)
.
This will implicitly call getDecorView()
with all of the associated side-effects.
Note: In most cases -- depending on compiler support -- the resulting view is automatically cast to the target class type. If the target class type is unconstrained, an explicit cast may be necessary.
Parameters | |
---|---|
id |
int : the ID to search for |
Returns | |
---|---|
T |
a view with given ID if found, or null otherwise |
public boolean getAllowEnterTransitionOverlap ()
Returns how the transition set in
setEnterTransition(android.transition.Transition)
overlaps with the exit
transition of the calling Activity. When true, the transition will start as soon as possible.
When false, the transition will wait until the remote exiting transition completes before
starting. The default value is true.
Related XML Attributes:
Returns | |
---|---|
boolean |
true when the enter transition should start as soon as possible or false to when it should wait until the exiting transition completes. |
public boolean getAllowReturnTransitionOverlap ()
Returns how the transition set in
setExitTransition(android.transition.Transition)
overlaps with the exit
transition of the called Activity when reentering after if finishes. When true,
the transition will start as soon as possible. When false, the transition will wait
until the called Activity's exiting transition completes before starting.
The default value is true.
Related XML Attributes:
Returns | |
---|---|
boolean |
true when the transition should start when possible or false when it should wait until the called Activity's exiting transition completes. |
public final WindowManager.LayoutParams getAttributes ()
Retrieve the current window attributes associated with this panel.
Returns | |
---|---|
WindowManager.LayoutParams |
WindowManager.LayoutParams Either the existing window attributes object, or a freshly created one if there is none. |
public final Window.Callback getCallback ()
Return the current Callback interface for this window.
Returns | |
---|---|
Window.Callback |
public int getColorMode ()
Returns the requested color mode of the window, one of
ActivityInfo#COLOR_MODE_DEFAULT
, ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT
or ActivityInfo#COLOR_MODE_HDR
. If ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT
was requested it is possible the window will not be put in wide color gamut mode depending
on device and display support for that mode. Use isWideColorGamut()
to determine
if the window is currently in wide color gamut mode.
Returns | |
---|---|
int |
Value is ActivityInfo.COLOR_MODE_DEFAULT , ActivityInfo.COLOR_MODE_WIDE_COLOR_GAMUT , or ActivityInfo.COLOR_MODE_HDR |
public final Window getContainer ()
Return the container for this Window.
Returns | |
---|---|
Window |
Window The containing window, or null if this is a top-level window. |
public Scene getContentScene ()
Retrieve the Scene
representing this window's current content.
Requires FEATURE_CONTENT_TRANSITIONS
.
This method will return null if the current content is not represented by a Scene.
Returns | |
---|---|
Scene |
Current Scene being shown or null |
public final Context getContext ()
Return the Context this window policy is running in, for retrieving resources and other information.
Returns | |
---|---|
Context |
Context The Context that was supplied to the constructor. |
public abstract View getCurrentFocus ()
Return the view in this Window that currently has focus, or null if there are none. Note that this does not look in any containing Window.
Returns | |
---|---|
View |
View The current View with focus or null. |
public abstract View getDecorView ()
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.
Note that calling this function for the first time "locks in"
various window characteristics as described in
setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
.
Returns | |
---|---|
View |
Returns the top-level window decor view.
This value cannot be null . |
public static int getDefaultFeatures (Context context)
Return the feature bits set by default on a window.
Parameters | |
---|---|
context |
Context : The context used to access resources |
Returns | |
---|---|
int |
public Transition getEnterTransition ()
Returns the transition used to move Views into the initial scene. The entering
Views will be those that are regular Views or ViewGroups that have
ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as entering is governed by changing visibility from
View#INVISIBLE
to View#VISIBLE
. If transition
is null,
entering Views will remain unaffected. Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
the Transition to use to move Views into the initial Scene. |
public Transition getExitTransition ()
Returns the Transition that will be used to move Views out of the scene when starting a
new Activity. The exiting Views will be those that are regular Views or ViewGroups that
have ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as exiting is governed by changing visibility
from View#VISIBLE
to View#INVISIBLE
. If transition is null, the views will
remain unaffected. Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
the Transition to use to move Views out of the scene when calling a new Activity. |
public WindowInsetsController getInsetsController ()
Returns | |
---|---|
WindowInsetsController |
The WindowInsetsController associated with this window
This value may be null . |
See also:
public abstract LayoutInflater getLayoutInflater ()
Quick access to the LayoutInflater
instance that this Window
retrieved from its Context.
Returns | |
---|---|
LayoutInflater |
LayoutInflater The shared LayoutInflater.
This value cannot be null . |
public MediaController getMediaController ()
Gets the MediaController
that was previously set.
Returns | |
---|---|
MediaController |
The controller which should receive events. |
public abstract int getNavigationBarColor ()
Returns | |
---|---|
int |
the color of the navigation bar. |
public int getNavigationBarDividerColor ()
Retrieves the color of the navigation bar divider.
Related XML Attributes:
Returns | |
---|---|
int |
The color of the navigation bar divider color. |
See also:
public Transition getReenterTransition ()
Returns the Transition that will be used to move Views in to the scene when returning from
a previously-started Activity. The entering Views will be those that are regular Views
or ViewGroups that have ViewGroup#isTransitionGroup
return true. Typical Transitions
will extend Visibility
as exiting is governed by changing
visibility from View#VISIBLE
to View#INVISIBLE
.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
The Transition to use to move Views into the scene when reentering from a previously-started Activity. |
public Transition getReturnTransition ()
Returns the 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
Activity.finishAfterTransition()
. The exiting
Views will be those that are regular Views or ViewGroups that have
ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as entering is governed by changing visibility from
View#VISIBLE
to View#INVISIBLE
.
Related XML Attributes:
Returns | |
---|---|
Transition |
The Transition to use to move Views out of the Scene when the Window is preparing to close. |
public Transition getSharedElementEnterTransition ()
Returns the Transition that will be used for shared elements transferred into the content
Scene. Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
Transition to use for sharend elements transferred into the content Scene. |
public Transition getSharedElementExitTransition ()
Returns the Transition to use for shared elements in the launching Window prior
to transferring to the launched Activity's Window.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
the Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window. |
public Transition getSharedElementReenterTransition ()
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.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
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. |
public Transition getSharedElementReturnTransition ()
Returns the Transition that will be used for shared elements transferred back to a
calling Activity. Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Returns | |
---|---|
Transition |
Transition to use for sharend elements transferred into the content Scene. |
public boolean getSharedElementsUseOverlay ()
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. The default value is true.
Related XML Attributes:
Returns | |
---|---|
boolean |
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. |
public abstract int getStatusBarColor ()
Returns | |
---|---|
int |
the color of the status bar. |
public List<Rect> getSystemGestureExclusionRects ()
Retrieve the list of areas within this window's coordinate space where the system should not
intercept touch or other pointing device gestures. This is the list as set by
setSystemGestureExclusionRects(java.util.List)
or an empty list if
setSystemGestureExclusionRects(java.util.List)
has not been called. It does not include
exclusion rects set by this window's view hierarchy.
Returns | |
---|---|
List<Rect> |
a list of system gesture exclusion rects specific to this window
This value cannot be null . |
public long getTransitionBackgroundFadeDuration ()
Returns the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition.
When executing the enter transition, the background starts transparent
and fades in. This requires FEATURE_ACTIVITY_TRANSITIONS
. The default is
300 milliseconds.
Related XML Attributes:
Returns | |
---|---|
long |
The duration of the window background fade to opaque during enter transition. |
See also:
public TransitionManager getTransitionManager ()
Retrieve the TransitionManager
responsible for for default transitions
in this window. Requires FEATURE_CONTENT_TRANSITIONS
.
This method will return non-null after content has been initialized (e.g. by using
setContentView(View)
) if FEATURE_CONTENT_TRANSITIONS
has been granted.
Related XML Attributes:
Returns | |
---|---|
TransitionManager |
This window's content TransitionManager or null if none is set. |
public abstract int getVolumeControlStream ()
Returns | |
---|---|
int |
See also:
public WindowManager getWindowManager ()
Return the window manager allowing this Window to display its own windows.
Returns | |
---|---|
WindowManager |
WindowManager The ViewManager. |
public final TypedArray getWindowStyle ()
Return the R.styleable.Window
attributes from this
window's theme.
Returns | |
---|---|
TypedArray |
public final boolean hasChildren ()
Returns | |
---|---|
boolean |
public boolean hasFeature (int feature)
Query for the availability of a certain feature.
Parameters | |
---|---|
feature |
int : The feature ID to check |
Returns | |
---|---|
boolean |
true if the feature is enabled, false otherwise. |
public void injectInputEvent (InputEvent event)
Inject an event to window locally.
Parameters | |
---|---|
event |
InputEvent : A key or touch event to inject to this window. |
public abstract void invalidatePanelMenu (int featureId)
Parameters | |
---|---|
featureId |
int |
public final boolean isActive ()
Returns | |
---|---|
boolean |
public abstract boolean isFloating ()
Return whether this window is being displayed with a floating style
(based on the R.attr.windowIsFloating
attribute in
the style/theme).
Returns | |
---|---|
boolean |
Returns true if the window is configured to be displayed floating on top of whatever is behind it. |
public boolean isNavigationBarContrastEnforced ()
Returns whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested.
When the navigation bar color has a non-zero alpha value, the value of this property has no effect.
Returns | |
---|---|
boolean |
true, if the system is ensuring contrast, false otherwise. |
public abstract boolean isShortcutKey (int keyCode, KeyEvent event)
Is a keypress one of the defined shortcut keys for this window.
Parameters | |
---|---|
keyCode |
int : the key code from KeyEvent to check. |
event |
KeyEvent : the KeyEvent to use to help check. |
Returns | |
---|---|
boolean |
public boolean isStatusBarContrastEnforced ()
Returns whether the system is ensuring that the status bar has enough contrast when a fully transparent background is requested.
When the status bar color has a non-zero alpha value, the value of this property has no effect.
Returns | |
---|---|
boolean |
true, if the system is ensuring contrast, false otherwise. |
public boolean isWideColorGamut ()
Returns true if this window's color mode is ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT
,
the display has a wide color gamut and this device supports wide color gamut rendering.
Returns | |
---|---|
boolean |
public final void makeActive ()
public abstract void onConfigurationChanged (Configuration newConfig)
Should be called when the configuration is changed.
Parameters | |
---|---|
newConfig |
Configuration : The new configuration. |
public abstract void openPanel (int featureId, KeyEvent event)
Parameters | |
---|---|
featureId |
int |
event |
KeyEvent |
public abstract View peekDecorView ()
Retrieve the current decor view, but only if it has already been created; otherwise returns null.
Returns | |
---|---|
View |
Returns the top-level window decor or null. |
See also:
public abstract boolean performContextMenuIdentifierAction (int id, int flags)
Parameters | |
---|---|
id |
int |
flags |
int |
Returns | |
---|---|
boolean |
public abstract boolean performPanelIdentifierAction (int featureId, int id, int flags)
Parameters | |
---|---|
featureId |
int |
id |
int |
flags |
int |
Returns | |
---|---|
boolean |
public abstract boolean performPanelShortcut (int featureId, int keyCode, KeyEvent event, int flags)
Parameters | |
---|---|
featureId |
int |
keyCode |
int |
event |
KeyEvent |
flags |
int |
Returns | |
---|---|
boolean |
public final void removeOnFrameMetricsAvailableListener (Window.OnFrameMetricsAvailableListener listener)
Remove observer and stop listening to frame stats for this window.
Parameters | |
---|---|
listener |
Window.OnFrameMetricsAvailableListener |
public boolean requestFeature (int featureId)
Enable extended screen features. This must be called before
setContentView(). May be called as many times as desired as long as it
is before setContentView(). If not called, no extended features
will be available. You can not turn off a feature once it is requested.
You canot use other title features with FEATURE_CUSTOM_TITLE
.
Parameters | |
---|---|
featureId |
int : The desired features, defined as constants by Window. |
Returns | |
---|---|
boolean |
The features that are now set. |
public final T requireViewById (int id)
Finds a view that was identified by the android:id
XML attribute
that was processed in Activity.onCreate(Bundle)
, or throws an
IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.
Note: In most cases -- depending on compiler support -- the resulting view is automatically cast to the target class type. If the target class type is unconstrained, an explicit cast may be necessary.
Parameters | |
---|---|
id |
int : the ID to search for |
Returns | |
---|---|
T |
a view with given ID
This value cannot be null . |
public abstract void restoreHierarchyState (Bundle savedInstanceState)
Parameters | |
---|---|
savedInstanceState |
Bundle |
public void setAllowEnterTransitionOverlap (boolean allow)
Controls how the transition set in
setEnterTransition(android.transition.Transition)
overlaps with the exit
transition of the calling Activity. When true, the transition will start as soon as possible.
When false, the transition will wait until the remote exiting transition completes before
starting. The default value is true.
Related XML Attributes:
Parameters | |
---|---|
allow |
boolean : true to start the enter transition when possible or false to
wait until the exiting transition completes. |
public void setAllowReturnTransitionOverlap (boolean allow)
Controls how the transition set in
setExitTransition(android.transition.Transition)
overlaps with the exit
transition of the called Activity when reentering after if finishes. When true,
the transition will start as soon as possible. When false, the transition will wait
until the called Activity's exiting transition completes before starting.
The default value is true.
Related XML Attributes:
Parameters | |
---|---|
allow |
boolean : true to start the transition when possible or false to wait until the
called Activity's exiting transition completes. |
public void setAttributes (WindowManager.LayoutParams a)
Specify custom window attributes. PLEASE NOTE: the
layout params you give here should generally be from values previously
retrieved with getAttributes()
; you probably do not want to
blindly create and apply your own, since this will blow away any values
set by the framework that you are not interested in.
Parameters | |
---|---|
a |
WindowManager.LayoutParams : The new window attributes, which will completely override any
current values. |
public abstract void setBackgroundDrawable (Drawable drawable)
Change the background of this window to a custom Drawable. Setting the background to null will make the window be opaque. To make the window transparent, you can use an empty drawable (for instance a ColorDrawable with the color 0 or the system drawable android:drawable/empty.)
Parameters | |
---|---|
drawable |
Drawable : The new Drawable to use for this window's background. |
public void setBackgroundDrawableResource (int resId)
Change the background of this window to a Drawable resource. Setting the background to null will make the window be opaque. To make the window transparent, you can use an empty drawable (for instance a ColorDrawable with the color 0 or the system drawable android:drawable/empty.)
Parameters | |
---|---|
resId |
int : The resource identifier of a drawable resource which will
be installed as the new background. |
public void setCallback (Window.Callback callback)
Set the Callback interface for this window, used to intercept key events and other dynamic operations in the window.
Parameters | |
---|---|
callback |
Window.Callback : The desired Callback interface. |
public abstract void setChildDrawable (int featureId, Drawable drawable)
Parameters | |
---|---|
featureId |
int |
drawable |
Drawable |
public abstract void setChildInt (int featureId, int value)
Parameters | |
---|---|
featureId |
int |
value |
int |
public void setClipToOutline (boolean clipToOutline)
Sets whether window content should be clipped to the outline of the window background.
Parameters | |
---|---|
clipToOutline |
boolean : Whether window content should be clipped to the
outline of the window background. |
public void setColorMode (int colorMode)
Sets the requested color mode of the window. The requested the color mode might
override the window's pixel WindowManager.LayoutParams#format
.
The requested color mode must be one of ActivityInfo#COLOR_MODE_DEFAULT
,
ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT
or ActivityInfo#COLOR_MODE_HDR
.
The requested color mode is not guaranteed to be honored. Please refer to
getColorMode()
for more information.
Parameters | |
---|---|
colorMode |
int : Value is ActivityInfo.COLOR_MODE_DEFAULT , ActivityInfo.COLOR_MODE_WIDE_COLOR_GAMUT , or ActivityInfo.COLOR_MODE_HDR |
public void setContainer (Window container)
Set the container for this window. If not set, the DecorWindow operates as a top-level window; otherwise, it negotiates with the container to display itself appropriately.
Parameters | |
---|---|
container |
Window : The desired containing Window. |
public abstract void setContentView (View view, ViewGroup.LayoutParams params)
Set the screen content to an explicit view. This view is placed directly into the screen's view hierarchy. It can itself be a complex view hierarchy.
Note that calling this function "locks in" various characteristics
of the window that can not, from this point forward, be changed: the
features that have been requested with requestFeature(int)
,
and certain window flags as described in setFlags(int, int)
.
If FEATURE_CONTENT_TRANSITIONS
is set, the window's
TransitionManager will be used to animate content from the current
content View to view.
Parameters | |
---|---|
view |
View : The desired content to display. |
params |
ViewGroup.LayoutParams : Layout parameters for the view. |
public abstract void setContentView (View view)
Convenience for
setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
set the screen content to an explicit view. This view is placed
directly into the screen's view hierarchy. It can itself be a complex
view hierarhcy.
Parameters | |
---|---|
view |
View : The desired content to display. |
public abstract void setContentView (int layoutResID)
Convenience for
setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
to set the screen content from a layout resource. The resource will be
inflated, adding all top-level views to the screen.
Parameters | |
---|---|
layoutResID |
int : Resource ID to be inflated. |
public abstract void setDecorCaptionShade (int decorCaptionShade)
Set what color should the caption controls be. By default the system will try to determine
the color from the theme. You can overwrite this by using DECOR_CAPTION_SHADE_DARK
,
DECOR_CAPTION_SHADE_LIGHT
, or DECOR_CAPTION_SHADE_AUTO
.
Parameters | |
---|---|
decorCaptionShade |
int |
public void setDecorFitsSystemWindows (boolean decorFitsSystemWindows)
Sets whether the decor view should fit root-level content views for WindowInsets
.
If set to true
, the framework will inspect the now deprecated
View#SYSTEM_UI_LAYOUT_FLAGS
as well the
WindowManager.LayoutParams#SOFT_INPUT_ADJUST_RESIZE
flag and fits content according
to these flags.
If set to false
, the framework will not fit the content view to the insets and will
just pass through the WindowInsets
to the content view.
Parameters | |
---|---|
decorFitsSystemWindows |
boolean : Whether the decor view should fit root-level content views for
insets. |
public void setDimAmount (float amount)
Set the amount of dim behind the window when using
WindowManager.LayoutParams#FLAG_DIM_BEHIND
. This overrides
the default dim amount of that is selected by the Window based on
its theme.
Parameters | |
---|---|
amount |
float : The new dim amount, from 0 for no dim to 1 for full dim. |
public void setElevation (float elevation)
Sets the window elevation.
Changes to this property take effect immediately and will cause the window surface to be recreated. This is an expensive operation and as a result, this property should not be animated.
Parameters | |
---|---|
elevation |
float : The window elevation. |
public void setEnterTransition (Transition transition)
Sets the Transition that will be used to move Views into the initial scene. The entering
Views will be those that are regular Views or ViewGroups that have
ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as entering is governed by changing visibility from
View#INVISIBLE
to View#VISIBLE
. If transition
is null,
entering Views will remain unaffected.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use to move Views into the initial Scene. |
public void setExitTransition (Transition transition)
Sets the Transition that will be used to move Views out of the scene when starting a
new Activity. The exiting Views will be those that are regular Views or ViewGroups that
have ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as exiting is governed by changing visibility
from View#VISIBLE
to View#INVISIBLE
. If transition is null, the views will
remain unaffected. Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use to move Views out of the scene when calling a
new Activity. |
public abstract void setFeatureDrawable (int featureId, Drawable drawable)
Set an explicit Drawable value for feature of this window. You must have called requestFeature(featureId) before calling this function.
Parameters | |
---|---|
featureId |
int : The desired drawable feature to change. Features are
constants defined by Window. |
drawable |
Drawable : A Drawable object to display. |
public abstract void setFeatureDrawableAlpha (int featureId, int alpha)
Set a custom alpha value for the given drawable feature, controlling how much the background is visible through it.
Parameters | |
---|---|
featureId |
int : The desired drawable feature to change. Features are
constants defined by Window. |
alpha |
int : The alpha amount, 0 is completely transparent and 255 is
completely opaque. |
public abstract void setFeatureDrawableResource (int featureId, int resId)
Set the value for a drawable feature of this window, from a resource identifier. You must have called requestFeature(featureId) before calling this function.
Parameters | |
---|---|
featureId |
int : The desired drawable feature to change, defined as a
constant by Window. |
resId |
int : Resource identifier of the desired image. |
See also:
public abstract void setFeatureDrawableUri (int featureId, Uri uri)
Set the value for a drawable feature of this window, from a URI. You must have called requestFeature(featureId) before calling this function.
The only URI currently supported is "content:", specifying an image in a content provider.
Parameters | |
---|---|
featureId |
int : The desired drawable feature to change. Features are
constants defined by Window. |
uri |
Uri : The desired URI. |
See also:
public abstract void setFeatureInt (int featureId, int value)
Set the integer value for a feature. The range of the value depends on
the feature being set. For FEATURE_PROGRESS
, it should go from
0 to 10000. At 10000 the progress is complete and the indicator hidden.
Parameters | |
---|---|
featureId |
int : The desired feature to change. Features are constants
defined by Window. |
value |
int : The value for the feature. The interpretation of this
value is feature-specific. |
public void setFlags (int flags, int mask)
Set the flags of the window, as per the
WindowManager.LayoutParams
flags.
Note that some flags must be set before the window decoration is
created (by the first call to
setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
or
getDecorView()
:
WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN
and
WindowManager.LayoutParams#FLAG_LAYOUT_INSET_DECOR
. These
will be set for you based on the R.attr.windowIsFloating
attribute.
Parameters | |
---|---|
flags |
int : The new window flags (see WindowManager.LayoutParams). |
mask |
int : Which of the window flag bits to modify. |
See also:
public void setFormat (int format)
Set the format of window, as per the PixelFormat types. This overrides the default format that is selected by the Window based on its window decorations.
Parameters | |
---|---|
format |
int : The new window format (see PixelFormat). Use
PixelFormat.UNKNOWN to allow the Window to select
the format. |
See also:
public void setGravity (int gravity)
Set the gravity of the window, as per the Gravity constants. This controls how the window manager is positioned in the overall window; it is only useful when using WRAP_CONTENT for the layout width or height.
Parameters | |
---|---|
gravity |
int : The desired gravity constant. |
See also:
public void setIcon (int resId)
Set the primary icon for this window.
Parameters | |
---|---|
resId |
int : resource ID of a drawable to set |
public void setLayout (int width, int height)
Set the width and height layout parameters of the window. The default for both of these is MATCH_PARENT; you can change them to WRAP_CONTENT or an absolute value to make a window that is not full-screen.
Parameters | |
---|---|
width |
int : The desired layout width of the window. |
height |
int : The desired layout height of the window. |
public void setLocalFocus (boolean hasFocus, boolean inTouchMode)
Set focus locally. The window should have the
WindowManager.LayoutParams#FLAG_LOCAL_FOCUS_MODE
flag set already.
Parameters | |
---|---|
hasFocus |
boolean : Whether this window has focus or not. |
inTouchMode |
boolean : Whether this window is in touch mode or not. |
public void setLogo (int resId)
Set the logo for this window. A logo is often shown in place of an
icon
but is generally wider and communicates window title information
as well.
Parameters | |
---|---|
resId |
int : resource ID of a drawable to set |
public void setMediaController (MediaController controller)
Sets a MediaController
to send media keys and volume changes to.
If set, this should be preferred for all media keys and volume requests
sent to this window.
Parameters | |
---|---|
controller |
MediaController : The controller for the session which should receive
media keys and volume changes. |
public abstract void setNavigationBarColor (int color)
Sets the color of the navigation bar to .
For this to take effect,
the window must be drawing the system bar backgrounds with
WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
and
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
must not be set.
If is not opaque, consider setting
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
and
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
.
The transitionName for the view background will be "android:navigation:background".
Related XML Attributes:
public void setNavigationBarContrastEnforced (boolean enforceContrast)
Sets whether the system should ensure that the navigation bar has enough contrast when a fully transparent background is requested.
If set to this value, the system will determine whether a scrim is necessary to ensure that the navigation bar has enough contrast with the contents of this app, and set an appropriate effective bar background color accordingly.
When the navigation bar color has a non-zero alpha value, the value of this property has no effect.
Parameters | |
---|---|
enforceContrast |
boolean |
public void setNavigationBarDividerColor (int dividerColor)
Shows a thin line of the specified color between the navigation bar and the app content.
For this to take effect,
the window must be drawing the system bar backgrounds with
WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
and
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
must not be set.
Related XML Attributes:
Parameters | |
---|---|
dividerColor |
int : The color of the thin line. |
public void setPreferMinimalPostProcessing (boolean isPreferred)
If isPreferred
is true, this method requests that the connected display does minimal
post processing when this window is visible on the screen. Otherwise, it requests that the
display switches back to standard image processing.
By default, the display does not do minimal post processing and if this is desired, this
method should not be used. It should be used with isPreferred=true
when low
latency has a higher priority than image enhancement processing (e.g. for games or video
conferencing). The display will automatically go back into standard image processing mode
when no window requesting minimal posst processing is visible on screen anymore.
setPreferMinimalPostProcessing(false)
can be used if
setPreferMinimalPostProcessing(true)
was previously called for this window and
minimal post processing is no longer required.
If the Display sink is connected via HDMI, the device will begin to send infoframes with Auto Low Latency Mode enabled and Game Content Type. This will switch the connected display to a minimal image processing mode (if available), which reduces latency, improving the user experience for gaming or video conferencing applications. For more information, see HDMI 2.1 specification.
If the Display sink has an internal connection or uses some other protocol than HDMI, effects may be similar but implementation-defined.
The ability to switch to a mode with minimal post proessing may be disabled by a user setting in the system settings menu. In that case, this method does nothing.
Parameters | |
---|---|
isPreferred |
boolean : Indicates whether minimal post processing is preferred for this window
(isPreferred=true ) or not (isPreferred=false ). |
public void setReenterTransition (Transition transition)
Sets the Transition that will be used to move Views in to the scene when returning from
a previously-started Activity. The entering Views will be those that are regular Views
or ViewGroups that have ViewGroup#isTransitionGroup
return true. Typical Transitions
will extend Visibility
as exiting is governed by changing
visibility from View#VISIBLE
to View#INVISIBLE
. If transition is null,
the views will remain unaffected. If nothing is set, the default will be to use the same
transition as setExitTransition(android.transition.Transition)
.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use to move Views into the scene when reentering from a
previously-started Activity. |
public abstract void setResizingCaptionDrawable (Drawable drawable)
Set the drawable that is drawn underneath the caption during the resizing. During the resizing the caption might not be drawn fast enough to match the new dimensions. There is a second caption drawn underneath it that will be fast enough. By default the caption is constructed from the theme. You can provide a drawable, that will be drawn instead to better match your application.
Parameters | |
---|---|
drawable |
Drawable |
public final void setRestrictedCaptionAreaListener (Window.OnRestrictedCaptionAreaChangedListener listener)
Set a callback for changes of area where caption will draw its content.
Parameters | |
---|---|
listener |
Window.OnRestrictedCaptionAreaChangedListener : Callback that will be called when the area changes. |
public void setReturnTransition (Transition transition)
Sets the 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
Activity.finishAfterTransition()
. The exiting
Views will be those that are regular Views or ViewGroups that have
ViewGroup#isTransitionGroup
return true. Typical Transitions will extend
Visibility
as entering is governed by changing visibility from
View#VISIBLE
to View#INVISIBLE
. If transition
is null,
entering Views will remain unaffected. If nothing is set, the default will be to
use the same value as set in setEnterTransition(android.transition.Transition)
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use to move Views out of the Scene when the Window
is preparing to close. |
public void setSharedElementEnterTransition (Transition transition)
Sets the Transition that will be used for shared elements transferred into the content
Scene. Typical Transitions will affect size and location, such as
ChangeBounds
. A null
value will cause transferred shared elements to blink to the final position.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use for shared elements transferred into the content
Scene. |
public void setSharedElementExitTransition (Transition transition)
Sets the Transition that will be used for shared elements after starting a new Activity
before the shared elements are transferred to the called Activity. If the shared elements
must animate during the exit transition, this Transition should be used. Upon completion,
the shared elements may be transferred to the started Activity.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use for shared elements in the launching Window
prior to transferring to the launched Activity's Window. |
public void setSharedElementReenterTransition (Transition transition)
Sets 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. If no value
is set, this will default to
setSharedElementExitTransition(android.transition.Transition)
.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use for shared elements in the launching Window
after the shared element has returned to the Window. |
public void setSharedElementReturnTransition (Transition transition)
Sets the Transition that will be used for shared elements transferred back to a
calling Activity. Typical Transitions will affect size and location, such as
ChangeBounds
. A null
value will cause transferred shared elements to blink to the final position.
If no value is set, the default will be to use the same value as
setSharedElementEnterTransition(android.transition.Transition)
.
Requires FEATURE_ACTIVITY_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
transition |
Transition : The Transition to use for shared elements transferred out of the content
Scene. |
public void setSharedElementsUseOverlay (boolean sharedElementsUseOverlay)
Sets whether or not shared elements should use an Overlay during shared element transitions. The default value is true.
Related XML Attributes:
Parameters | |
---|---|
sharedElementsUseOverlay |
boolean : true indicates that shared elements should
be transitioned with an Overlay or false
to transition within the normal View hierarchy. |
public void setSoftInputMode (int mode)
Specify an explicit soft input mode to use for the window, as per
WindowManager.LayoutParams#softInputMode
. Providing anything besides
"unspecified" here will override the input mode the window would
normally retrieve from its theme.
Parameters | |
---|---|
mode |
int |
public abstract void setStatusBarColor (int color)
Sets the color of the status bar to color
.
For this to take effect,
the window must be drawing the system bar backgrounds with
WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
and
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
must not be set.
If color
is not opaque, consider setting
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
and
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
.
The transitionName for the view background will be "android:status:background".
Parameters | |
---|---|
color |
int |
public void setStatusBarContrastEnforced (boolean ensureContrast)
Sets whether the system should ensure that the status bar has enough contrast when a fully transparent background is requested.
If set to this value, the system will determine whether a scrim is necessary to ensure that the status bar has enough contrast with the contents of this app, and set an appropriate effective bar background color accordingly.
When the status bar color has a non-zero alpha value, the value of this property has no effect.
Parameters | |
---|---|
ensureContrast |
boolean |
public void setSustainedPerformanceMode (boolean enable)
Parameters | |
---|---|
enable |
boolean |
public void setSystemGestureExclusionRects (List<Rect> rects)
Sets a list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures.
This method should be used by apps that make use of
takeSurface(android.view.SurfaceHolder.Callback2)
and do not have a view hierarchy available.
Apps that do have a view hierarchy should use
View#setSystemGestureExclusionRects(List)
instead. This method does not modify or
replace the gesture exclusion rects populated by individual views in this window's view
hierarchy using View#setSystemGestureExclusionRects(List)
.
Use this to tell the system which specific sub-areas of a view need to receive gesture
input in order to function correctly in the presence of global system gestures that may
conflict. For example, if the system wishes to capture swipe-in-from-screen-edge gestures
to provide system-level navigation functionality, a view such as a navigation drawer
container can mark the left (or starting) edge of itself as requiring gesture capture
priority using this API. The system may then choose to relax its own gesture recognition
to allow the app to consume the user's gesture. It is not necessary for an app to register
exclusion rects for broadly spanning regions such as the entirety of a
ScrollView
or for simple press and release click targets such as
Button
. Mark an exclusion rect when interacting with a view requires
a precision touch gesture in a small area in either the X or Y dimension, such as
an edge swipe or dragging a SeekBar
thumb.
Do not modify the provided list after this method is called.
Parameters | |
---|---|
rects |
List : A list of precision gesture regions that this window needs to function correctly
This value cannot be null . |
public abstract void setTitleColor (int textColor)
Parameters | |
---|---|
textColor |
int |
public void setTransitionBackgroundFadeDuration (long fadeDurationMillis)
Sets the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition.
When executing the enter transition, the background starts transparent
and fades in. This requires FEATURE_ACTIVITY_TRANSITIONS
. The default is
300 milliseconds.
Related XML Attributes:
Parameters | |
---|---|
fadeDurationMillis |
long : The duration of the window background fade to or from opaque
during enter transition. |
public void setTransitionManager (TransitionManager tm)
Set the TransitionManager
to use for default transitions in this window.
Requires FEATURE_CONTENT_TRANSITIONS
.
Related XML Attributes:
Parameters | |
---|---|
tm |
TransitionManager : The TransitionManager to use for scene changes. |
public void setType (int type)
Set the type of the window, as per the WindowManager.LayoutParams types.
Parameters | |
---|---|
type |
int : The new window type (see WindowManager.LayoutParams). |
public void setUiOptions (int uiOptions)
Set extra options that will influence the UI for this window.
Parameters | |
---|---|
uiOptions |
int : Flags specifying extra options for this window. |
public void setUiOptions (int uiOptions, int mask)
Set extra options that will influence the UI for this window. Only the bits filtered by mask will be modified.
Parameters | |
---|---|
uiOptions |
int : Flags specifying extra options for this window. |
mask |
int : Flags specifying which options should be modified. Others will remain unchanged. |
public abstract void setVolumeControlStream (int streamType)
Parameters | |
---|---|
streamType |
int |
See also:
public void setWindowAnimations (int resId)
Specify custom animations to use for the window, as per
WindowManager.LayoutParams#windowAnimations
. Providing anything besides
0 here will override the animations the window would
normally retrieve from its theme.
Parameters | |
---|---|
resId |
int |
public void setWindowManager (WindowManager wm, IBinder appToken, String appName)
Set the window manager for use by this Window to, for example, display panels. This is not used for displaying the Window itself -- that must be done by the client.
Parameters | |
---|---|
wm |
WindowManager : The window manager for adding new windows. |
appToken |
IBinder |
appName |
String |
public void setWindowManager (WindowManager wm, IBinder appToken, String appName, boolean hardwareAccelerated)
Set the window manager for use by this Window to, for example, display panels. This is not used for displaying the Window itself -- that must be done by the client.
Parameters | |
---|---|
wm |
WindowManager : The window manager for adding new windows. |
appToken |
IBinder |
appName |
String |
hardwareAccelerated |
boolean |
public abstract boolean superDispatchGenericMotionEvent (MotionEvent event)
Used by custom windows, such as Dialog, to pass the generic motion event further down the view hierarchy. Application developers should not need to implement or call this.
Parameters | |
---|---|
event |
MotionEvent |
Returns | |
---|---|
boolean |
public abstract boolean superDispatchKeyEvent (KeyEvent event)
Used by custom windows, such as Dialog, to pass the key press event further down the view hierarchy. Application developers should not need to implement or call this.
Parameters | |
---|---|
event |
KeyEvent |
Returns | |
---|---|
boolean |
public abstract boolean superDispatchKeyShortcutEvent (KeyEvent event)
Used by custom windows, such as Dialog, to pass the key shortcut press event further down the view hierarchy. Application developers should not need to implement or call this.
Parameters | |
---|---|
event |
KeyEvent |
Returns | |
---|---|
boolean |
public abstract boolean superDispatchTouchEvent (MotionEvent event)
Used by custom windows, such as Dialog, to pass the touch screen event further down the view hierarchy. Application developers should not need to implement or call this.
Parameters | |
---|---|
event |
MotionEvent |
Returns | |
---|---|
boolean |
public abstract boolean superDispatchTrackballEvent (MotionEvent event)
Used by custom windows, such as Dialog, to pass the trackball event further down the view hierarchy. Application developers should not need to implement or call this.
Parameters | |
---|---|
event |
MotionEvent |
Returns | |
---|---|
boolean |
public abstract void takeInputQueue (InputQueue.Callback callback)
Take ownership of this window's InputQueue. The window will no longer read and dispatch input events from the queue; it is your responsibility to do so.
Parameters | |
---|---|
callback |
InputQueue.Callback |
public abstract void takeKeyEvents (boolean get)
Request that key events come to this activity. Use this if your activity has no views with focus, but the activity still wants a chance to process key events.
Parameters | |
---|---|
get |
boolean |
public abstract void takeSurface (SurfaceHolder.Callback2 callback)
Take ownership of this window's surface. The window's view hierarchy will no longer draw into the surface, though it will otherwise continue to operate (such as for receiving input events). The given SurfaceHolder callback will be used to tell you about state changes to the surface.
Parameters | |
---|---|
callback |
SurfaceHolder.Callback2 |
public abstract void togglePanel (int featureId, KeyEvent event)
Parameters | |
---|---|
featureId |
int |
event |
KeyEvent |
protected final int getFeatures ()
Return the feature bits that are enabled. This is the set of features that were given to requestFeature(), and are being handled by this Window itself or its container. That is, it is the set of requested features that you can actually use.
To do: add a public version of this API that allows you to check for features by their feature ID.
Returns | |
---|---|
int |
int The feature bits. |
protected final int getForcedWindowFlags ()
Return the window flags that have been explicitly set by the client,
so will not be modified by getDecorView()
.
Returns | |
---|---|
int |
protected final int getLocalFeatures ()
Return the feature bits that are being implemented by this Window. This is the set of features that were given to requestFeature(), and are being handled by only this Window itself, not by its containers.
Returns | |
---|---|
int |
int The feature bits. |
protected final boolean hasSoftInputMode ()
Has the app specified their own soft input mode?
Returns | |
---|---|
boolean |
protected abstract void onActive ()
protected void setDefaultWindowFormat (int format)
Set the default format of window, as per the PixelFormat types. This is the format that will be used unless the client specifies in explicit format with setFormat();
Parameters | |
---|---|
format |
int : The new window format (see PixelFormat). |
See also: