有规律的时间间隔之后调用特定的方法 [英] Call Particular Method after regular interval of time

查看:90
本文介绍了有规律的时间间隔之后调用特定的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的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

这篇关于有规律的时间间隔之后调用特定的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆