Android EditText- maxLength -


I know that I

  android: maxLength = "10".  

But can I also set the maximum length, once the whole editing text is filled with text, then the user can not now type anything?

Something like this:

| _________________________ | & Lt; - Empty Editing Text | Text text text _________ | & Lt; - Users can still type in the text. Texttexttexttexttexttextt

Edit: In other words

: I do not want it to be limited to only 10 characters but I I want to limit so that once the whole editing text is filled (depending on the screen size), users can not type in the stuff.

use it

  yourEditText.addTextChangedListener (new textvotter () {@Override public) Text before zero is changed (after integer, int counting, int) {// Todo auto generated method stub} @TextChanged (rounds, s, int, int, int count) on public null To override {// TODO auto generated method stub (if your edit text .gettext (). ToString (). Length ()> gt; = 10) {yourEditText.setEnable (false)}} @Override publi (Editable) {// TODO auto generated Method stub}  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -