tags:

views:

1281

answers:

2

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?

A: 

I think you should be able to editText.setOnClickListener() with your own function and call super.onClickListener() if you want your text edited.

Edit:
Following link has some answers which sound more like the right way:
http://stackoverflow.com/questions/910135/can-we-have-uneditable-text-in-edittext

buster
I know, I provided one of the answers there :) This question is not about *how* to make it non-editable but *why* setEnabled(false) would still allow modifications. I was wondering whether I got the widget-enabled concept wrong.
Josef
+2  A: 

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.

Jon Colverson