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 This screen shows an AutoText edit field.

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);
    }
}
Previous topic: Autocomplete text field

Was this information helpful? Send us your comments.