editText.setFocusable(editable); editText.setFocusableInTouchMode(editable); editText.setClickable(editable); editText.setLongClickable(editable); editText.setCursorVisible(editable);
editText.setClickable(editable); editText.setLongClickable(editable); editText.setCursorVisible(editable);
@Override public void setEditMode(boolean isEditMode) { if (isEditMode) { EDT_diary_text.setFocusable(true); EDT_diary_text.setFocusableInTouchMode(true); EDT_diary_text.setClickable(true); EDT_diary_text.setEnabled(true); } else { EDT_diary_text.setFocusable(false); EDT_diary_text.setFocusableInTouchMode(false); EDT_diary_text.setClickable(false); EDT_diary_text.setEnabled(false); } }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case 0: EditText myEditText = (EditText) findViewById(R.id.textBox); myEditText.setClickable(true); myEditText.setFocusable(true); myEditText.requestFocus(); default: break; } }
@OnClick(R.id.fab_next) public void onNextClicked() { Utils.hideSoftKeyboard(this); mFabNext.setClickable(false); mProgressBar.setVisibility(View.VISIBLE); mTvVerifyingOtp.setVisibility(View.VISIBLE); mEtOtp.setClickable(false); mEtOtp.setFocusableInTouchMode(false); mEtOtp.setFocusable(false); Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { mMobileVerificationPresenter.verifyOTP(mEtOtp.getText().toString()); } }, 1500); }
@Override public void onOtpVerificationFailed(String s) { mFabNext.setClickable(true); mProgressBar.setVisibility(View.GONE); mTvVerifyingOtp.setVisibility(View.GONE); mEtOtp.setClickable(true); mEtOtp.setFocusableInTouchMode(true); mEtOtp.setFocusable(true); showToast(s); }
EditText test3 = (EditText) findViewById(R.id.edittext); CheckBox check1= (CheckBox) findViewById(R.id.checkBox1); test3.setClickable(false); test3.setEnabled(false); test3.setFocusable(false); check1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(check1.isChecked()){ test3.setText(""); test3.setClickable(false); test3.setEnabled(false); test3.setFocusable(false); } else { test3.setClickable(true); test3.setEnabled(true); test3.setFocusable(true); test3.setFocusableInTouchMode(true); } } });
public void disEditTextEvent() { mEtText.setClickable(false); mEtText.setFocusable(false); this.setClickable(true); this.setFocusable(true); }
editText.setText(val); editText.setClickable(false); editText.setCursorVisible(false); editText.setFocusable(false);
private void setEditable(boolean editable) { mEditView.setEnabled(editable); mEditView.setFocusableInTouchMode(editable); mEditView.setFocusable(editable); mEditView.setClickable(editable); mEditView.setLongClickable(editable); } }
/** * Whether or not the digits above the dialer can be edited. * * @param canBeEdited If true, the backspace button will be shown and the digits EditText * will be configured to allow text manipulation. */ public void setCanDigitsBeEdited(boolean canBeEdited) { View deleteButton = findViewById(R.id.deleteButton); deleteButton.setVisibility(canBeEdited ? View.VISIBLE : View.GONE); View overflowMenuButton = findViewById(R.id.dialpad_overflow); overflowMenuButton.setVisibility(canBeEdited ? View.VISIBLE : View.GONE); EditText digits = (EditText) findViewById(R.id.digits); digits.setClickable(canBeEdited); digits.setLongClickable(canBeEdited); digits.setFocusableInTouchMode(canBeEdited); digits.setCursorVisible(false); mCanDigitsBeEdited = canBeEdited; }
private void onException(String toastText) { mHasExApp = false; if ( !mPrompt.isReadOnly() ) { mAnswer.setBackgroundDrawable(mTextBackground); mAnswer.setFocusable(true); mAnswer.setFocusableInTouchMode(true); mAnswer.setClickable(true); } mLaunchIntentButton.setEnabled(false); mLaunchIntentButton.setFocusable(false); Collect.getInstance().getFormController().setIndexWaitingForData(null); Toast.makeText(getContext(), toastText, Toast.LENGTH_SHORT) .show(); ExStringWidget.this.mAnswer.requestFocus(); } });
private makeEditable(boolean isEditable,EditText et){ if(isEditable){ et.setBackgroundDrawable("Give the textbox background here");//You can store it in some variable and use it over here while making non editable. et.setFocusable(true); et.setEnabled(true); et.setClickable(true); et.setFocusableInTouchMode(true); et.setKeyListener("Set edit text key listener here"); //You can store it in some variable and use it over here while making non editable. }else{ et.setBackgroundDrawable(new ColorDrawable(Color.WHITE)); et.setFocusable(false); et.setClickable(false); et.setFocusableInTouchMode(false); et.setEnabled(false); et.setKeyListener(null); } }
@Override public void onRequestOtpSuccess() { hideProgressDialog(); mEtMobileNumber.setClickable(false); mEtMobileNumber.setFocusableInTouchMode(false); mEtMobileNumber.setFocusable(false); mCcpCode.setCcpClickable(false); mEtOtp.setVisibility(View.VISIBLE); mBtnGetOtp.setClickable(false); mBtnGetOtp.setBackgroundResource(R.drawable.ic_done); mFabNext.setVisibility(View.VISIBLE); }
editTextName.setHint("Name"); editTextName.setFocusable(true); editTextName.setClickable(true); editTextName.setFocusableInTouchMode(true); editTextName.setSelectAllOnFocus(true); editTextPassword.setHint("Password"); editTextPassword.setFocusable(true); editTextPassword.setClickable(true); editTextPassword.setFocusableInTouchMode(true); editTextPassword.setSelectAllOnFocus(true);
EditText Et; // initialize your edittext// Et.setCursorVisible(false); Et.setLongClickable(false); Et.setClickable(false); Et.setFocusable(false); Et.setSelected(false); Et.setKeyListener(null); Et.setBackgroundResource(android.R.color.transparent);
styleEditText.setClickable(false); styleEditText.setHint(mHint);
mEditText.setClickable(true); mEditText.setOnClickListener(this); mEditCode.setClickable(true); mEditCode.setOnClickListener(this);
mAnswer.setBackgroundDrawable(null); mAnswer.setFocusable(false); mAnswer.setClickable(false);
public static void toggleSelectableState(EditText editText){ if(editText.isTextSelectable()){ editText.setTextIsSelectable(false); editText.setMovementMethod(ArrowKeyMovementMethod.getInstance()); editText.setCursorVisible(true); editText.setFocusable(true); editText.setFocusableInTouchMode(true); editText.setClickable(true); editText.setLongClickable(true); }else{ editText.setTextIsSelectable(true); editText.setCursorVisible(false); } }