Update the UI with dynamic text

后端 未结 3 1124
一向
一向 2021-01-23 05:49

I wish to update the text on the screen every 5 second, I have created a timer to do so. However after the first update it never updates the box again. I am assuming I need to r

3条回答
  •  盖世英雄少女心
    2021-01-23 06:21

    Using a handler is a good strategy but you don't really need a custom callback. Instead you can just use postDelayed with a Runnable. See this Android doc for details on implementation.

提交回复
热议问题