android - Put constrains to an EditText -
I have an edit text and I want to put the following restrictions in XML code (if possible):
- Disable all capital letters (inversion of android: collocation or similar focus than live cass)
- Block text to maximize 1 text . (For example, to avoid when I enter editing, then it grows up to create a new line)
In fact, my edit text is a search field ( But in my case I do not want to use the special search widget.)
Thanks
< P> To add a single line to the editive, add it to its tag:
android: singleLine = "true"
In addition to Android: Capitalization dropped And instead the following should be used
android: inputType = "textCapCharacters"
Although no matching lowercase input is typed , So you may have to apply it manually using setOnKeyListener.
Comments
Post a Comment