Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make EditText field uneditable

How to make EditText Field uneditable over property inputType when

inputType="textPassword"

My problem is that following code line makes the password visible.

password.setInputType(InputType.TYPE_NULL);

Already tried following, but remains editable

password.setEnabled(false)
like image 436
endian Avatar asked Feb 21 '26 11:02

endian


1 Answers

If you play with :

edittext.setFocusable();
edittext.setFocusableInTouchMode();

You should be able to make the EditText editable/uneditable when you want.

like image 147
Jeremy D Avatar answered Feb 23 '26 00:02

Jeremy D



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!