nUITextfieldElement
com.softwareag.mobile.runtime.nui.nUITextfieldElement
Use to display plain text in a label or for a block of text.
Usage Notes
![*](bullet.gif)
The following are platform-specific considerations:
Android | ![*](bullet.gif) By default, the HAlign attribute, which specifies the horizontal alignment of the text, is set to left. ![*](bullet.gif) By default, the TextColor attribute, which specifies the text color, is set to white. ![*](bullet.gif) For the ClipType attribute, Android devices support CLIP_TYPE_CLIP, which indicates that Android devices truncate the text if it is too long to display. |
iOS | ![*](bullet.gif) By default, the HAlign attribute, which specifies the horizontal alignment of the text, is set to center. ![*](bullet.gif) By default, the TextColor attribute, which specifies the text color, is set to black. ![*](bullet.gif) For the ClipType attribute, iOS devices support CLIP_TYPE_ELLIPSIS, which indicates that iOS devices truncate the text that is too long to display and add an ellipsis to indicate the text has been truncated. |
Windows Phone | ![*](bullet.gif) By default, the HAlign attribute, which specifies the horizontal alignment of the text, is set to left. ![*](bullet.gif) By default, the TextColor attribute, which specifies the text color, is set to black when using a light theme and is set to white when using a dark theme. For more information, see Theme Resources for Windows Phone. ![*](bullet.gif) For the ClipType attribute, Windows Phones support the following: CLIP_TYPE_CLIP, which indicates that Windows Phones truncate the text if it is too long to display. This is the default. CLIP_TYPE_ELLIPSIS, which indicates that Windows Phones truncate the text that is too long to display and add an ellipsis to indicate the text has been truncated. |
Example
This code sample displays plain text. Illustrations of how the example code is rendered on various platforms follows the code sample.
view.add(new nUITextfieldElement(NUIID_MY_TEXTFIELD, "nUITextfieldElement"));
Platform | Platform-Specific Class and Illustration |
Android | TextView |
iOS 7 | UILabel |
iOS 6 | UILabel |
Windows Phone | System.Windows.Controls.TextBlock |
Other | |