Android: simple time counter

后端 未结 6 2238
-上瘾入骨i
-上瘾入骨i 2020-12-09 02:56

I have a simple program with one TextView and two Buttons: Button1 and Button2.

Clicking on Button 1 will start a counter, increasing by 1 every 1 second and show res

6条回答
  •  醉话见心
    2020-12-09 03:35

    Chekout this example, that uses the Chronometer class: http://android-er.blogspot.com/2010/06/android-chronometer.html

    Using the Chronometer class will save you managing the thread yourself.

提交回复
热议问题