IME_NULL源码实例Demo

android.view.inputmethod.EditorInfo#IME_NULL源码实例Demo

下面列出了android.view.inputmethod.EditorInfo#IME_NULL 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: IdeaTrackerPlus   文件: MainActivity.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {

    if (actionId == EditorInfo.IME_ACTION_GO
            || actionId == EditorInfo.IME_ACTION_DONE
            || actionId == EditorInfo.IME_ACTION_NEXT
            || actionId == EditorInfo.IME_ACTION_SEND
            || actionId == EditorInfo.IME_ACTION_SEARCH
            || actionId == EditorInfo.IME_NULL) {

        switch ((int) v.getTag()) {
            case 1:
                mNoteField.requestFocus();
                break;

            case 2:
                sendIdeaFromDialog();
                break;

            default:
                break;
        }
        return true;
    }
    return false;
}
 
源代码2 项目: Silence   文件: PassphrasePromptActivity.java
@Override
public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent keyEvent) {
  if ((keyEvent == null && actionId == EditorInfo.IME_ACTION_DONE) ||
      (keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
          (actionId == EditorInfo.IME_NULL)))
  {
    handlePassphrase();
    return true;
  } else if (keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_UP &&
             actionId == EditorInfo.IME_NULL)
  {
    return true;
  }

  return false;
}
 
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    // If the action is a key-up event on the return key, send the message
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
        String message = view.getText().toString();
        sendMessage(message);
    }
    return true;
}
 
@Override
public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent keyEvent) {
  if ((keyEvent == null && actionId == EditorInfo.IME_ACTION_DONE) ||
      (keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
       (actionId == EditorInfo.IME_NULL))) {
    if (okButton.isClickable()) {
      okButton.performClick();
    }
    return true;
  }
  return keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_UP
          && actionId == EditorInfo.IME_NULL;
}
 
源代码5 项目: MHViewer   文件: SignInScene.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (v == mPassword) {
        if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL) {
            signIn();
            return true;
        }
    }

    return false;
}
 
源代码6 项目: MHViewer   文件: SearchBar.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (v == mEditText) {
        if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_NULL) {
            applySearch();
            return true;
        }
    }
    return false;
}
 
源代码7 项目: WanAndroid   文件: LoginActivity.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if ((actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL)
            && ((isLogIn && v == binding.password) || (!isLogIn && v == binding.againPassword))
            ) { // 点击了键盘上的回车,如果是登录并且是密码框,则登录。如果是注册,并且是再次输入密码框,则注册
        onClickOk(null);
        return true;
    }

    return false;
}
 
源代码8 项目: IdeaTrackerPlus   文件: RecyclerOnClickListener.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_GO
            || actionId == EditorInfo.IME_ACTION_DONE
            || actionId == EditorInfo.IME_ACTION_NEXT
            || actionId == EditorInfo.IME_ACTION_SEND
            || actionId == EditorInfo.IME_ACTION_SEARCH
            || actionId == EditorInfo.IME_NULL) {
        mNoteField.requestFocus();
    }
    return true;
}
 
源代码9 项目: IdeaTrackerPlus   文件: RecyclerOnClickListener.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_GO
            || actionId == EditorInfo.IME_ACTION_DONE
            || actionId == EditorInfo.IME_ACTION_NEXT
            || actionId == EditorInfo.IME_ACTION_SEND
            || actionId == EditorInfo.IME_ACTION_SEARCH
            || actionId == EditorInfo.IME_NULL) {
        sendEditIdea();
    }
    return true;
}
 
源代码10 项目: Car_remote_control   文件: MainActivity.java
public boolean onEditorAction(TextView view, int actionId, KeyEvent event)
{
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP)
    {
        String message = view.getText().toString();
        sendMessage(message);
    }
    return true;
}
 
源代码11 项目: document-viewer   文件: ActionEx.java
@Override
public boolean onEditorAction(final TextView textView, final int actionId, final KeyEvent keyEvent) {
    if ((actionId == EditorInfo.IME_NULL || actionId == EditorInfo.IME_ACTION_DONE)) {
        if ((keyEvent == null || keyEvent.getAction() == KeyEvent.ACTION_UP)) {
            this.putValue(IActionController.VIEW_PROPERTY, textView);
            run();
        }
        return true;
    }
    return false;
}
 
源代码12 项目: quill   文件: LoginUrlFragment.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == getResources().getInteger(R.integer.ime_action_id_next)
            || actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL) {
        onNextClicked();
        // don't consume the event, so the keyboard can also be hidden
        // http://stackoverflow.com/questions/2342620/how-to-hide-keyboard-after-typing-in-edittext-in-android#comment20849208_10184099
        return false;
    }
    return false;
}
 
源代码13 项目: BLEChat   文件: ExampleFragment.java
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    // If the action is a key-up event on the return key, send the message
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
        String message = view.getText().toString();
        if(message != null && message.length() > 0)
        	sendMessage(message);
    }
    return true;
}
 
源代码14 项目: BTChat   文件: ExampleFragment.java
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    // If the action is a key-up event on the return key, send the message
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
        String message = view.getText().toString();
        if(message != null && message.length() > 0)
        	sendMessage(message);
    }
    return true;
}
 
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    // If the action is a key-up event on the return key, send the message
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
        String message = view.getText().toString();
        sendMessage(message);
    }
    return true;
}
 
源代码16 项目: gilgamesh   文件: StatusListFragment.java
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    // If the action is a key-up event on the return key, send the message
    if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
        String message = view.getText().toString();
        updateStatus(message);
    }
    if(D) Log.i(TAG, "END onEditorAction");
    return true;
}
 
源代码17 项目: EhViewer   文件: SignInScene.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (v == mPassword) {
        if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL) {
            signIn();
            return true;
        }
    }

    return false;
}
 
源代码18 项目: EhViewer   文件: SearchBar.java
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (v == mEditText) {
        if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_NULL) {
            applySearch();
            return true;
        }
    }
    return false;
}
 
源代码19 项目: WaniKani-for-Android   文件: LocalIMEKeyboard.java
/**
 * Handler of editor actions. It intercepts the "enter" key and moves to the
 * next question, by calling {@link #next()}.
 */
@Override
public boolean onEditorAction (TextView tv, int actionId, KeyEvent event)
{
    if (actionId == EditorInfo.IME_ACTION_DONE
            || (actionId == EditorInfo.IME_NULL && event != null &&
                event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) {
        next ();
        return true;
    }

    return false;
}
 
源代码20 项目: mongol-library   文件: MongolEditText.java
public int getImeOptions() {
    return mInputContentType != null
            ? mInputContentType.imeOptions : EditorInfo.IME_NULL;
}