Exemple #1
0
  @Override
  public void onStartInputView(EditorInfo editorInfo, boolean restarting) {
    if (restarting) {
      return;
    }

    // The initialCapsMode docs say that you should generally just take a non-zero value to mean
    // "start out in caps mode":
    // http://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#initialCapsMode
    mode.setShifted(editorInfo.initialCapsMode != 0);

    if ((editorInfo.inputType & InputType.TYPE_MASK_CLASS) != InputType.TYPE_CLASS_TEXT) {
      mode.setNumeric();
    }
  }