Help Center

Local Navigation

Display the keyboard on a BlackBerry device with a touch screen

  1. Import the following classes:
    • net.rim.device.api.ui.VirtualKeyboard
    • a Screen class, such as net.rim.device.api.ui.container.MainScreen
  2. Create an instance of VirtualKeyboard.
    VirtualKeyboard virtKbd;
  3. Store an instance of a screen class.
    MainScreen _screen = new MainScreen( MainScreen.VERTICAL_SCROLL );
  4. Invoke getVirtualKeyboard() and store the return value in the VirtualKeyboard variable.
    virtKbd = _screen.getVirtualKeyboard();
  5. Perform one of the following tasks:

    Task

    Steps

    Always display the touch screen keyboard.

    Invoke VirtualKeyboard.setVisibility(VirtualKeyboard.SHOW_FORCE).

    Display the touch screen keyboard on a new screen.

    Invoke VirtualKeyboard.setVisibility(int) using one of the following constants as a parameter: VirtualKeyboard.SHOW or VirtualKeyboard.SHOW_FORCE.

Index


Was this information helpful? Send us your comments.