有规律的时间间隔之后调用特定的方法间隔、规律、时间、方法

2023-09-06 14:12:16 作者:哼唱ぃ小緈諨

在我的Andr​​oid应用程序,我想在时间即固定时间间隔调用特定的方法。 每5秒钟后,......我怎么能做到这一点....?

In my android application I want to call particular method at regular interval of time ie. "after every 5 seconds"...how can i do that....?

推荐答案

您可以使用定时器为固定周期执行的方法。

You can use Timer for the fixed-period execution of a method.

在这里看到是一个教程上这样的:

See here is a tutorial on this:

http://steve.odyfamily.com/?p=12