Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can I type into a disabled EditText?

Tags:

android

If I disable an EditText widget using

editText.setEnabled(false);

I can still type into it using the on-screen input method (in both the emulator and on the G1). Is this intended? How can I workaround this issue?

like image 231
Josef Pfleger Avatar asked May 26 '09 14:05

Josef Pfleger


2 Answers

I notice that you can't activate the on-screen keyboard by tapping on a disabled EditText, and also the DEL key doesn't work, so this looks like a bug to me. I filed it as issue 2771 in the Android issue tracker.

like image 80
Jon Colverson Avatar answered Oct 01 '22 01:10

Jon Colverson


edittext.setKeyListener(null);

This will help you

like image 32
SKT Avatar answered Oct 01 '22 01:10

SKT