Package | com.distriqt.extension.application.display |
Interface | public interface Display extends flash.events.IEventDispatcher |
Property | Defined By | ||
---|---|---|---|
displayMetrics : DisplayMetrics [read-only]
This allows you to get information about the display on the current device. | Display | ||
userInterfaceStyle : String [read-only]
Returns the current user interface style for the application. | Display | ||
willCutoutAffectView : Boolean [read-only]
This function will determine if the current application view
will be affected by a screen cutout or notch. | Display |
Method | Defined By | ||
---|---|---|---|
getBrightness():Number
Gets the screen brightness. | Display | ||
Returns the display cutout if there is one
The display cutout represents the area of the display that is not
functional for displaying content, i.e. | Display | ||
getStatusBarHeight():int
Returns the height of the status bar in pixels. | Display | ||
getSystemUiVisibility():int
Android Only
Returns the last setSystemUiVisibility(int) that this view has requested. | Display | ||
setBrightness(value:Number, animated:Boolean = false):Boolean
Sets the screen brightness. | Display | ||
setDisplayMode(displayMode:String, layoutMode:String):Boolean
Sets the display mode for the application
Support:
Android;
| Display | ||
setNavigationBarColour(colour:uint):Boolean
Set the colour of the Android Navigation bar for API versions >= 21 (Lollipop)
| Display | ||
setNavigationBarStyle(style:int):Boolean
Sets the style of the navigation bar icons on Android
| Display | ||
setStatusBarColour(colour:uint, alpha:Number = 1):Boolean
Set the colour of the Android Status bar for API versions >= 21 (Lollipop)
| Display | ||
setStatusBarHidden(hidden:Boolean = true, animation:String = none):Boolean
Hides/Shows the status bar on iOS
Support: iOS only
| Display | ||
setStatusBarStyle(style:uint, animated:Boolean = false):Boolean
Sets the UIStatusBarStyle for the status bar on iOS and controls the icon styles on Android
| Display | ||
setSystemUiVisibility(flags:int):Boolean
Android Only
Allows direct access to set the System UI Visibility flag
on Android. | Display |
displayMetrics | property |
displayMetrics:DisplayMetrics
[read-only] This allows you to get information about the display on the current device.
public function get displayMetrics():DisplayMetrics
userInterfaceStyle | property |
userInterfaceStyle:String
[read-only]
Returns the current user interface style for the application.
This defines whether the system has a "dark mode" in place for the
application or the default "light".
This will be one of the values defined in UserInterfaceStyle
public function get userInterfaceStyle():String
willCutoutAffectView | property |
willCutoutAffectView:Boolean
[read-only]
This function will determine if the current application view
will be affected by a screen cutout or notch.
This will not definitely determine if the device has a notch but
if your application view will be affected by one. Eg in the case
when your application is displayed below the notch then and hence
unaffected by the cutout it will return false
.
If this returns true
then the getSafeArea
function will return the area unaffected by the cutouts.
public function get willCutoutAffectView():Boolean
getBrightness | () | method |
public function getBrightness():Number
Gets the screen brightness.
ReturnsNumber — The brightness value, in the range 0 - 1. This may return -1 if there was an error retrieving the brightness
|
getDisplayCutout | () | method |
public function getDisplayCutout():DisplayCutout
Returns the display cutout if there is one The display cutout represents the area of the display that is not functional for displaying content, i.e. is occupied by hardware components such as a display notch for cameras
ReturnsDisplayCutout — DisplayCutout object for the current display or null if there isn't one.
|
getStatusBarHeight | () | method |
public function getStatusBarHeight():int
Returns the height of the status bar in pixels. The status bar is the top area of the UI where items such as the battery level, connection strength, and notifications etc are displayed.
Returnsint — The height of the status bar in pixels
|
getSystemUiVisibility | () | method |
public function getSystemUiVisibility():int
Android Only Returns the last setSystemUiVisibility(int) that this view has requested.
Returnsint — The System UI Visibility flag
|
See also
setBrightness | () | method |
public function setBrightness(value:Number, animated:Boolean = false):Boolean
Sets the screen brightness. The system may reset this value in certain circumstances, eg after opening from a device lock. These circumstances depend on the operating system and the version. We suggest you use the application state events to set your desired value each time the application is brought to the foreground.
Parameters
value:Number — The brightness value, in the range 0 - 1
| |
animated:Boolean (default = false ) — (not supported currently)
|
Boolean — true if successful and false if changing the brightness isn't supported
|
setDisplayMode | () | method |
public function setDisplayMode(displayMode:String, layoutMode:String):Boolean
Sets the display mode for the application Support:
Parameters
displayMode:String — The display mode to set
| |
layoutMode:String (default = NaN ) — The layout mode to set, determining how to handle cutouts
|
Boolean — true if the mode was set correctly and
false if there was an error or the functionality is not supported
|
See also
setNavigationBarColour | () | method |
public function setNavigationBarColour(colour:uint):Boolean
Set the colour of the Android Navigation bar for API versions >= 21 (Lollipop)
Parameters
colour:uint — The colour to use for the background of the status bar
|
Boolean — true if the colour was set, or false if the device doesn't support navigation bar colour or if an error occurred.
|
setNavigationBarStyle | () | method |
public function setNavigationBarStyle(style:int):Boolean
Sets the style of the navigation bar icons on Android
Parameters
style:int — The status bar style to be set
|
Boolean |
See also
setStatusBarColour | () | method |
public function setStatusBarColour(colour:uint, alpha:Number = 1):Boolean
Set the colour of the Android Status bar for API versions >= 21 (Lollipop)
Parameters
colour:uint — The colour to use for the background of the status bar
| |
alpha:Number (default = 1 )
|
Boolean — true if the colour was set, or false if the device doesn't support status bar colour or if an error occurred.
|
setStatusBarHidden | () | method |
public function setStatusBarHidden(hidden:Boolean = true, animation:String = none):Boolean
Hides/Shows the status bar on iOS
Support: iOS only
Parameters
hidden:Boolean (default = true ) — Whether the status bar is hidden or shown (true to hide)
| |
animation:String (default = none ) — The animation to use (either "fade", "slide" or "none" )
|
Boolean |
setStatusBarStyle | () | method |
public function setStatusBarStyle(style:uint, animated:Boolean = false):Boolean
Sets the UIStatusBarStyle for the status bar on iOS and controls the icon styles on Android
Parameters
style:uint — The status bar style to be set
| |
animated:Boolean (default = false ) — Whether to animate the style transition
|
Boolean |
See also
setSystemUiVisibility | () | method |
public function setSystemUiVisibility(flags:int):Boolean
Android Only Allows direct access to set the System UI Visibility flag on Android. Please see the Android documentation on usage of the flags.
Parameters
flags:int — Bit values from the Android flags
|
Boolean — true if supported and the view was updated
|
See also