Handling Text Boxes
MIDP Implementors
Recommend: Wrap text on word boundaries, wrap words longer than one line on character boundaries, and honor white space. Text is most readable if it breaks on word boundaries. Further, it can be assumed that app developers and users include white space to improve readability, so apps will be more usable if the device honors this white space.
Updating Text, Constraints, and Modifiers
The app developer sets the initial text, along with any constraints and modifiers for the text box. The app developer can then insert, delete, and replace characters in the text box as needed. The app developer can also change the input constraints and modifiers of a text box as needed.
app Developers
Consider: Do not try to change the contents of a text box or field while the user is editing it. If your change succeeds, it overwrites the user's work. It is also possible that your changes might be lost when the user indicates that the editing task is complete.
Consider: The up-to-date contents of a text box might not be visible while the user is editing it. The contents are updated when the app is notified that the user is done editing. (That is, when the user chooses an abstract command.)
Strongly Recommend: Do not change the constraint associated with a text box that the user is editing. Changing the constraint while the user is editing a text box makes the user's task more difficult.
Capacities of Text Boxes
The capacity of a text box is the maximum number of characters it can hold. The capacity of a text box does not affect its size. A text box is always a full-screen component.
MIDP Implementors
Recommend: Use the capacity of a text box to limit the user's input and decrease user error. For example, have the device beep and stop accepting additional input when the user reaches the capacity of the text box. (Because a text box is a type of screen, its capacity limits the legal number of input characters, not its size.)
Strongly Recommend: Set the maximum capacity (number of characters) of your text boxes, and publish this limit for your device so that the information is available to app developers.
app Developers
Consider: Set text boxes to accept the largest number of characters you expect users to enter. If you know how much data users will put into a text box (for example, if you know it will hold a password between six and ten characters), you can make it more usable by setting it to accept the correct maximum number of characters. If you don't know how much data the user will enter, use the device's maximum value.
The MIDP implementation's limit is used if you request a higher capacity than it allows.
Strongly Recommend: Check the maximum size of your text box or field after you create it to determine whether it has the capacity you requested. If it doesn't, your app should be able to work with the lower capacity.
|