1

I am writing an app which requires at a time the EditText view to be uneditable. I used editText.setEnabled(false); it is greyed out alright, but the IME still pops up, and I still could type in characters, why could this be???

user685275
  • 2,097
  • 8
  • 26
  • 32

1 Answers1

4
            if (cbProhibitEditPW.isChecked()) { // disable editing password
                editTextPassword.setFocusable(false);
                editTextPassword.setFocusableInTouchMode(false); // user touches widget on phone with touch screen
                editTextPassword.setClickable(false); // user navigates with wheel and selects widget
                isProhibitEditPassword= true;
            }
            else { // enable editing of password
                editTextPassword.setFocusable(true);
                editTextPassword.setFocusableInTouchMode(true);
                editTextPassword.setClickable(true);
                isProhibitEditPassword= false;
            }  
JAL
  • 3,319
  • 2
  • 20
  • 17