Type Function Library native.* Return value none Revision Release 2024.3703 Keywords native property See also native.getProperty()
Sets a platform-specific property.
native.setProperty( key, value )
String. The property whose value will be changed. Supported keys include:
"androidSystemUiVisibility"
— Android only; see androidSystemUiVisibility below for permissible value
options."applicationIconBadgeNumber"
— iOS only; specify an integer."applicationSupportsShakeToEdit"
— iOS only; specify a boolean for value
."networkActivityIndicatorVisible"
— iOS only; specify a boolean for value
."prefersHomeIndicatorAutoHidden"
— iOS only; specify a boolean for value
. If set, iPhone X software home indicator would autohide if screen is not interacted with."windowMode"
— Applies only to macOS desktop and Win32 desktop apps; sets the window mode. Supported values include "normal"
, "minimized"
, "maximized"
, or "fullscreen"
. Default is "normal"
."windowSize"
— Applies only to macOS desktop and Win32 desktop apps; sets the window width and/or height. Specify a table with either width
and/or height
values."windowTitleText"
— Applies only to macOS desktop and Win32 desktop apps; sets the window's title bar text to the specified string."mouseCursor"
— Applies only to macOS desktop and Win32 desktop apps. Sets one of the platform-provided mouse cursors for the application window. Specify a string for value
."mouseCursorVisible"
— Applies only to macOS desktop and Win32 desktop apps. Shows or hides the mouse cursor while it is hovering over the application window. Specify a boolean for value
."preferredScreenEdgesDeferringSystemGestures"
— iOS only; specify a boolean for value
. If set, system gestures (Control Center, notification bar, etc.) would not work immediately, but require additional swipe to activate. When possible this setting should be left at default false
but can be useful to prevent accidental activation of system gestures in swipe heavy games.Number, String, or Boolean. The value to set the specified property to, as represented by key
.
Only available on Android and Fire OS devices. If the version of Android does not support the value, nothing will happen.
"immersiveSticky"
— Only on Android KitKat (Api 19) and higher or Fire OS 2 "immersive"
— Only on Android KitKat (Api 19) and higher or Fire OS 2 "immersiveSticky"
."lowProfile"
— Only on Android Ice Cream Sandwich (Api 14) or above. Dims the navigation bar icons."default"
— Resets the value.-- Sets application icon badge number to 10 (iOS only) native.setProperty( "applicationIconBadgeNumber", 10 )
-- Sets system UI visibility (Android KitKat or above) native.setProperty( "androidSystemUiVisibility", "immersiveSticky" )
-- Sets the window mode (Win32 desktop and macOS desktop apps only) native.setProperty( "windowMode", "maximized" )
-- Sets the window title text (Win32 desktop and macOS desktop apps only) native.setProperty( "windowTitleText", "Window Title Test" )
-- Sets a platform-provided mouse cursor for the window native.setProperty( "mouseCursor", "arrow" ) -- Win32 cursors: appStarting, arrow, crosshair, pointingHand, beam, notAllowed, resizeAll, resizeNorthEastSouthWest, resizeUpDown, resizeNorthWestSouthEast, resizeLeftRight, upArrow, hourglass -- macOS cursors: arrow, closedHand, openHand, pointingHand, crosshair, notAllowed, beam, resizeRight, resizeLeft, resizeLeftRight, resizeUp, resizeDown, resizeUpDown, disappearingItem, beamHorizontal, dragLink, dragCopy, contextMenu