Restrict the touch screen direction

  1. Import the following classes:
    • net.rim.device.api.ui.Ui
    • net.rim.device.api.ui.UiEngineInstance
  2. Invoke net.rim.device.api.ui.Ui.getUiEngineInstance().
    UiEngineInstance _ue;
    _ue = Ui.getUiEngineInstance();
    
  3. Invoke net.rim.device.api.ui.UiEngineInstance.setAcceptableDirections(byte flags) and pass the argument for the direction of the Screen.
    _ue.setAcceptableDirections(Display.DIRECTION_WEST);

Was this information helpful? Send us your comments.