I have edittext where I want to enter percentage value i.e decimals value, So I want to limit the user to enter only value less than 100 in the editText.
Example:1) if he want to enter value more than 100, it should not allow him to enter this.
2)If he wants t0 enter decimal value less than 100 i.e 50.5444 then it should allow him to enter this value
I have also found this link where I can set filter for integer value maximum to 100 but its not allowing me to enter decimal value
link: http://tech.chitgoks.com/2011/06/27/android-set-min-max-value-an-edittext-accepts/
Can anybody help me.
Hey you can use the TextWatcher, apply it to your EditText
and implement the three methods it provides. Then, when you insert a new value, you can use a RegEx to check its validity.
Hope it helps!