android - Converting Edit Text to long for Countdown timer -
i trying take value edit text , use set time countdown timer. code below. log cat indicating issue line 63:"b = long.parselong(strinput);"
if (!timerhasstarted) { string strinput = gettext(r.id.ttext).tostring(); b = long.parselong(strinput); starttime = ((b) * 1000); text.settext(text.gettext() + string.valueof(starttime / 1000)); countdowntimer = new mycountdowntimer( starttime, interval); countdowntimer.start();
get value edittext as:
edittext edttext = (edittext)findviewbyid(r.id.ttext); string strinput = edttext.gettext().tostring(); b = long.parselong(strinput);
Comments
Post a Comment