I set the InputType of an EditText to TYPE_NULL with:
editText.setInputType(InputType.TYPE_NULL);
I can set it to TYPE_NULL, it works! But if I want to set InputType to something else, like TYPE_CLASS_TEXT, it doesn't work!
How can I change it dynamically in code? Like to TYPE_NULL, then to TYPE_CLASS_TEXT and to TYPE_NULL again?
To do this you first have to change the INPUT TYPE, then add text to it dynamically as follows.....
editText.setInputType(InputType.TYPE_CLASS_TEXT);
editText.setText("Hello");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With