I have this in the layout xml
android:digits="0123456789."
android:inputType="phone" />
What I want is to be able to change it programatically and be able to change it back and forth.
The inputType part is fine with
manual_ip.setInputType(InputType.TYPE_CLASS_TEXT);
or
manual_ip.setInputType(InputType.TYPE_CLASS_PHONE);
But I’m clueless with digits parts..
I need to limit the chars to “0123456789.” or allow everything depending on a checkbox state.
Adding
after
and nothing after
solves my problem!