java - android setEnabled but unchange text -


I have some text fields that I want to make un-editable at certain times. I used the setEnabled method but that text also grows. Is there a way to toggle that field can be edited, but can not change the appearance of the text? It's been a while since the last mess with Android, but I think I was able to use setEditable, which I did exactly what I want.

I tried to use Android: Focus = "false" but I'm still able to edit the field, unless it's just the behavior of the emulator, I do not think it will work.

You set the input as an input code for any editing signal without any visible signal You can disable InputType .YPE_NULL . An example would look like this:

  Import android.text.InputType; . . . MyEditText..setInputType (InputType.TYPE_NULL);   

Note that this behavior does not say exactly what that is saying and it is not equivalent to XML.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -