nUISearchEntry
com.softwareag.mobile.runtime.nui.nUISearchEntry
Use to display a search entry field. You can restrict the user input to alphanumeric characters or only numbers.
Note: The
nUISearchEntry NativeUI object is similar to the
nUIEntryElement NativeUI object except that the
nUISearchEntry object does not allow masking the entry field.
Usage Notes
Set the
Format attribute to indicate the type of text allowable in the text entry field. Use one of the following values:
Value | Meaning |
nUIEntryElement.FORMAT_STRING_ANY | Alphanumeric field |
nUIEntryElement.FORMAT_NUMBER_ANY | Numeric-only field |
The entered text is always visible in the search entry field. If you need to mask the field's contents, for example to use for a field where a user enters passwords or personal identifier numbers (PIN)s, use
nUIEntryElement object instead.
Use the
HintText attribute to provide text to indicate what the user should enter in the entry field. The text displays in the entry field, typically in a light gray, and disappears as soon as the user starts typing in the field.
The following are platform-specific considerations:
Android | Android devices generate an EVT_TRIGGER event when a user selects the button adjacent to the text field. |
iOS | iOS devices generate an EVT_TRIGGER event when a user presses the Search or Enter key. Hint text does not display in multi-line entry boxes. |
Example
This code sample displays a search entry field. Details on how the example code is rendered on various platforms follow the code sample.
view.add(new nUISearchEntry(NUIID_MY_SEARCH_ENTRY, "nUISearchEntry"));
Platform | Platform-Specific Class and Visual Reference |
Android | android.widget.SearchView |
iOS | UISearchBar |