This class contains constants for all of the available inputtypes as defined on Android Developers except TYPE_TEXT_FLAG_AUTO_COMPLETE, which would require a Java library to be of any use, but we have other options to do this anyway.
It also provides a method to update the values associated with an EditText as many of the Constants need to be OR'd to work.
There are some examples in the file, the basic principle is that you need to specify a class and either the Flag and/or variation required. Some are already available in the designer and the InputType Constants provided with the EditText methods.
I wanted to use FLAG_NO_SUGGESTIONS and it seemed almost as easy to create a class with all of the constants.
I've tested quite a few of the combinations and some do not seem to do anything on some devices. For instance, the HTC already has sense which is automatically on and provides some functionality without having to turn it on.
There are also methods to get the current InputType, InputTypeClass, InputTypeFlags and InputTypeVariation.
You can compile it directly to a library if you want to. Let me now if you find any issues.
Requires the Reflection Library.
Version 1 attached
Version 1.1 - Added initialize object
Version 1-2 - Added missing flag for completeness, would require an additional library to implement.
It also provides a method to update the values associated with an EditText as many of the Constants need to be OR'd to work.
There are some examples in the file, the basic principle is that you need to specify a class and either the Flag and/or variation required. Some are already available in the designer and the InputType Constants provided with the EditText methods.
I wanted to use FLAG_NO_SUGGESTIONS and it seemed almost as easy to create a class with all of the constants.
I've tested quite a few of the combinations and some do not seem to do anything on some devices. For instance, the HTC already has sense which is automatically on and provides some functionality without having to turn it on.
There are also methods to get the current InputType, InputTypeClass, InputTypeFlags and InputTypeVariation.
You can compile it directly to a library if you want to. Let me now if you find any issues.
Requires the Reflection Library.
Version 1 attached
Version 1.1 - Added initialize object
Version 1-2 - Added missing flag for completeness, would require an additional library to implement.
Attachments
Last edited: