Example #1
0
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
      switch (keyCode) {
        case KeyEvent.KEYCODE_VOLUME_UP:
        case KeyEvent.KEYCODE_VOLUME_DOWN:
          return super.onKeyDown(keyCode, event);

        default:
          break;
      }

      handleKeyDown(host, keyCode, event.getUnicodeChar());
      return true;
    }
Example #2
0
 @Override
 public boolean onKeyUp(int keyCode, KeyEvent event) {
   handleKeyUp(host, keyCode, event.getUnicodeChar());
   return true;
 }