android - Having trouble creating a stopwatch timer with Calendar class -



android - Having trouble creating a stopwatch timer with Calendar class -

i have been having little problem using calendar class create stopwatch timer. reason, programme keeps crashing when piece of code called. tried using other classes such timer & date, same thing happened. code follows:

private onclicklistener clearbuttonlistener = new onclicklistener() { public void onclick(view v) { calendar.set(calendar.hour, 0); calendar.set(calendar.minute, 0); calendar.set(calendar.second, 0); calendar.set(calendar.millisecond, 0); fulltime = calendar.hour + ":" + calendar.minute + ":" + calendar.second + ":" + calendar.millisecond; timetextview.settext(fulltime); } };

should utilize class (other stopwatch class) prepare problem? bunch.

please not vote downwards on post. if post unclear in way, please express concern in comments section. give thanks you.

have initialised "calender" or "timetextview"? maybe can post exception first. initialise calender phone call calendar.getinstance();

android timer stopwatch

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -