/** * Change the custom IME action associated with the text view, which * will be reported to an IME with {@link EditorInfo#actionLabel} * and {@link EditorInfo#actionId} when it has focus. * @see #getImeActionLabel * @see #getImeActionId * @see EditorInfo * @attr ref android.R.styleable#TextView_imeActionLabel * @attr ref android.R.styleable#TextView_imeActionId */ public void setImeActionLabel (CharSequence label, int actionId){ mInputView.setImeActionLabel(label, actionId); }
input.setImeActionLabel(activity.getResources().getString(positiveButtonText), KeyEvent.KEYCODE_ENTER); input.setOnEditorActionListener((v, actionId, event) -> { onPositive.onTextSet(input.getText().toString());
mSession = (ShellSession) System.getCurrentSession(); mOutput.append(Html.fromHtml("<font color=\"green\">Enter Command:></font>\n\n")); mInput.setImeActionLabel(getResources().getString(R.string.run), KeyEvent.KEYCODE_ENTER); runButton.setOnClickListener(new View.OnClickListener() { @Override
EditText input = new EditText(context); input.setImeOptions(EditorInfo.IME_ACTION_DONE); input.setImeActionLabel("My Text", EditorInfo.IME_ACTION_DONE);
EditText input = new EditText(context); input.setImeOptions(EditorInfo.IME_ACTION_DONE); input.setImeActionLabel("Guess", EditorInfo.IME_ACTION_DONE);
@InjectView(R.id.id_message) @NotEmpty(messageResId = R.string.err_message_empty) EditText message; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_preclass3, container, false); ButterKnife.inject(this, v); message.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE); message.setImeActionLabel("Enviar", EditorInfo.IME_ACTION_DONE); message.setImeOptions(EditorInfo.IME_ACTION_DONE); message.setLines(8); message.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { boolean handled = false; if (actionId == EditorInfo.IME_ACTION_DONE) { onNextClick(message); handled = true; } return handled; } }); return v; }
input.setImeActionLabel(activity.getResources().getString(positiveButtonText), KeyEvent.KEYCODE_ENTER); input.setOnEditorActionListener((v, actionId, event) -> { onPositive.onTextSet(input.getText().toString());
private void updatePasswordView(KeyPair keyPair) { currentKeyPair = keyPair; String encodedPrivateKey = keyPair == null ? null : keyPair.privateKey.privateKeyEncoded; passwordButton.setEnabled(!TextUtils.isEmpty(passwordEdit.getText()) && !TextUtils.isEmpty(encodedPrivateKey)); showQRCodePrivateKeyButton.setVisibility(keyPair == null ? View.GONE : View.VISIBLE); ((TextView) findViewById(R.id.err_password)).setText(""); if (keyPair != null && keyPair.privateKey.type == BTCUtils.Bip38PrivateKeyInfo.TYPE_BIP38) { if (keyPair.privateKey.privateKeyDecoded == null) { passwordButton.setText(R.string.decrypt_private_key); passwordEdit.setImeActionLabel(getString(R.string.ime_decrypt), R.id.action_decrypt); } else { if (getString(passwordEdit).equals(((BTCUtils.Bip38PrivateKeyInfo) keyPair.privateKey).password)) { passwordButton.setText(getString(lastBip38ActionWasDecryption ? R.string.decrypted : R.string.encrypted)); passwordButton.setEnabled(false); } else { passwordButton.setText(getString(R.string.encrypt_private_key)); passwordButton.setEnabled(true); } passwordEdit.setImeActionLabel(getString(R.string.ime_encrypt), R.id.action_encrypt); } passwordEdit.setEnabled(true); } else if (keyPair != null && keyPair.privateKey.testNet) { passwordEdit.setEnabled(false); } else { passwordButton.setText(R.string.encrypt_private_key); passwordEdit.setImeActionLabel(getString(R.string.ime_encrypt), R.id.action_encrypt); passwordEdit.setEnabled(true); } onUnspentOutputsInfoChanged(); }
searchViewEdit.setImeActionLabel("Search AnyAudio", KeyEvent.KEYCODE_ENTER);
private void setupViews() { mSearchEditText.setImeActionLabel(getString(R.string.launch), EditorInfo.IME_ACTION_GO); mSearchEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override