AutoText edit field
Use an AutoText edit field to automatically correct text that a BlackBerry® device user types in the field. The text is corrected based on the AutoText definition list, which lists common typographic errors and corrections. The text is corrected when the user presses the Space key.
| Class | AutoTextEditField |
| Supported since | BlackBerry® Java® SDK 4.0 |
| Example |
|
For more information about AutoText edit fields, see the UI Guidelines.
Code sample: Creating an AutoText edit field
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.AutoTextEditField;
public class AutoTextEditFieldDemo extends UiApplication
{
public static void main(String[] args)
{
AutoTextEditFieldDemo theApp = new AutoTextEditFieldDemo();
theApp.enterEventDispatcher();
}
public AutoTextEditFieldDemo()
{
pushScreen(new AutoTextEditFieldDemoScreen());
}
}
class AutoTextEditFieldDemoScreen extends MainScreen
{
public AutoTextEditFieldDemoScreen()
{
setTitle("AutoText Edit Field Demo");
AutoTextEditField myField = new AutoTextEditField("Description: ", "");
add(myField);
}
}
Next topic: Active AutoText edit field
Previous topic: Autocomplete text field