EditText in Google Android -


i want create edittext allow numeric values, comma , delete , other values ignore.

so how can achieve programming code ?

thanks.

i achieved same thing using follwing code, hope find it.

edittext.addtextchangedlistener(controller);   @override public void aftertextchanged(editable s) {     if(s.trim.length() > 0)             {                  int start = s.tostring().length() - 1;                  int = (int) s.charat(start);                  if (!(a >= 48 && <= 57 || == 44))                     s = s.delete(start, start + 1);             } }  @override public void beforetextchanged(charsequence s, int start, int count,         int after) { }  @override public void ontextchanged(charsequence s, int start, int before, int count) { } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -