android.inputmethodservice.Keyboard.setShifted()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中android.inputmethodservice.Keyboard.setShifted()方法的一些代码示例,展示了Keyboard.setShifted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyboard.setShifted()方法的具体详情如下:
包路径:android.inputmethodservice.Keyboard
类名称:Keyboard
方法名:setShifted

Keyboard.setShifted介绍

暂无

代码示例

代码示例来源:origin: PhilippC/keepass2android

@Override
public boolean setShifted(boolean shiftState) {
  boolean shiftChanged = false;
  if (mShiftKey != null) {
    if (shiftState == false) {
      shiftChanged = mShiftState != SHIFT_OFF;
      mShiftState = SHIFT_OFF;
      mShiftKey.on = false;
      mShiftKey.icon = mOldShiftIcon;
    } else {
      if (mShiftState == SHIFT_OFF) {
        shiftChanged = mShiftState == SHIFT_OFF;
        mShiftState = SHIFT_ON;
        mShiftKey.icon = mShiftLockIcon;
      }
    }
  } else {
    return super.setShifted(shiftState);
  }
  return shiftChanged;
}

代码示例来源:origin: PhilippC/keepass2android

/**
 * Sets the state of the shift key of the keyboard, if any.
 * @param shifted whether or not to enable the state of the shift key
 * @return true if the shift key state changed, false if there was no change
 */
public boolean setShifted(boolean shifted) {
  if (mKeyboard != null) {
    if (mKeyboard.setShifted(shifted)) {
      // The whole keyboard probably needs to be redrawn
      invalidateAllKeys();
      return true;
    }
  }
  return false;
}

代码示例来源:origin: stackoverflow.com

current.setShifted(false);

代码示例来源:origin: VladThodo/behe-keyboard

private void setCapsOn(boolean on) {
  /** Simple function that enables us to rapidly set the keyboard shifted or not.
   * */
  if(Variables.isShift()){
    kv.getKeyboard().setShifted(true);
    kv.invalidateAllKeys();
  }
  else {
    kv.getKeyboard().setShifted(on);
    kv.invalidateAllKeys();
  }
}
private void processKeyCombo(int keycode) {

代码示例来源:origin: stackoverflow.com

keyboard.setShifted(caps);
keyview.invalidateAllKeys();

代码示例来源:origin: stackoverflow.com

case Keyboard.KEYCODE_SHIFT:
  caps = !caps;
  keyboard.setShifted(caps);
  kv.invalidateAllKeys();
  break;

相关文章