android - EditText to Integer -
i want parse edittext value integer without using string. possible? like:
integer s1=edt1.gettext().toint(); integer s1=integer.parseint(edt1.gettext();
i think have use tostring()
before can convert integer
. gettext()
returns , editable
- can tell - not valid argument of integer
conversion methods.
int woohoo = integer.parseint(edittext.gettext().tostring());
you don't need create intermediate string if that's you're asking. can pass results of methods used input parseint()
method.
Comments
Post a Comment