Help Center

Local Navigation

Change the state of 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

    Retrieve the state of the touch screen keyboard.

    Invoke VirtualKeyboard.getVisibility().

    Change the state of the touch screen keyboard.

    Invoke VirtualKeyboard.setVisibility(int).

    Inherit the state of the touch screen keyboard.

    Invoke VirtualKeyboard.setVisibility(Virtual Keyboard.IGNORE).

Index


Was this information helpful? Send us your comments.