java - User input from editText to a String -
i looks simple question, can't manage work.
i'm trying make weather app, , im using yahoo api, , app works:
service.refreshweather("dallas, tx"); i wanted make user input city, made this:
mbutton = (button)findviewbyid(r.id.mdugme); medit = (edittext)findviewbyid(r.id.unesigrad); string userinput11; mbutton.setonclicklistener( new view.onclicklistener() { public void onclick(view view) { userinput11 = medit.gettext().tostring(); } }); service.refreshweather(userinput11); why isn't working?
take code
mbutton.setonclicklistener( new view.onclicklistener() { public void onclick(view view) { userinput11 = medit.gettext().tostring(); } }); service.refreshweather(userinput11); and reorder this
mbutton.setonclicklistener( new view.onclicklistener() { public void onclick(view view) { userinput11 = medit.gettext().tostring(); service.refreshweather(userinput11); } }); it may demand declare service final. not sure. follow ide instructions.
Comments
Post a Comment