NativeUI Class | Description | ||
nUIConstants | Use the following integers to represent the directionality: TEXT_DIRECTION_LTR for left-to-right directionality TEXT_DIRECTION_RTL for right-to-left directionality | ||
nUIController | Use the following methods to control the global behavior of the application: deviceSupportsAppDirectionality() method The deviceSupportsAppDirectionality() method indicates whether the platform supports a specified directionality at run time. The method returns true if the platform supports the directionality or false if it does not. The method might return false for one of the following reasons: Directionality support for the platform was unavailable through the NativeUI system at the current time. The device’s locale settings do not allow a directionality change at the current time. The platform does not support the directionality due to other platform-specific issues. | ||
void setAppDirectionality(int direction) method Use the void setAppDirectionality(int direction) method to set the directionality. For direction, specify either TEXT_DIRECTION_RTL for right-to-left or TEXT_DIRECTION_LTR for left-to-right. After changing the directionality, the getAppDirectionality() method immediately reflects the new direction. At the application’s next update cycle iteration, the NativeUI heartbeat thread invokes CanvasNativeUI.appDirectionalityChanged() with the new direction.
| |||
getAppDirectionality() method The getAppDirectionality() method returns the application’s current global directionality setting, either TEXT_DIRECTION_LTR or TEXT_DIRECTION_RTL. | |||
nUITableElement | Use the following methods to manage the directionality within a nUITableElement NativeUI object: Use the setIgnoreDirectionality() method to have the NativeUI system ignore the application’s current directionality setting. If an application’s directionality is set to right-to-left, by default, the table’s column order is reversed. If you do not want the columns reversed, use this method to ignore the directionality setting for the table columns. For example, you might want this if the table contains images that you want displayed in a specific order regardless of the application’s directionality. Use the getIgnoreDirectionality() method to determine whether the application directionality will affect the ordering of columns within the table. The method returns true if column ordering will be affected by the application directionality or false if column ordering will not be affected. |
Platform | Notes |
Android | Android version 11 and higher support right-to-left directionality. In previous versions, right-to-left support depends on OEM additions to the Android code base to ensure font availability and right-to-left text rendering. The nUICheckboxButton, nUIRadioCheckbox, and nUIDropdownlistEntry NativeUI objects display using left-to-right directionality. Additionally, non-custom dialog boxes, that is, those created using the nUIAlertDialog NativeUI object, might also retain left-to-right alignments. |
iOS | The following NativeUI objects display using left-to-right directionality. nUICheckboxButton nUIDropdownlistEntry nUIRadioCheckbox nUINavView The buttons within a nUIDialogWindow NativeUI object display using a left-to-right directionality. |
Windows Phone Windows 8 Windows RT | At this time, Windows Phone, Windows 8 and Windows RT do not support right-to-left directionality. |
J2ME (Phoney) | The NativeUI system attempts to provide directionality features similar to those that other platforms provide. In general, the NativeUI system makes the functionality align with that provided by Android and iOS. |