Handler 的postDelayed 这方法的作用是什么?

-droidcoffee- -droidcoffee- 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
public final boolean postDelayed(Runnable r, long delayMillis)


看英文文档 没看明白。。。

求解释
Causes the Runnable r to be added to the message queue, to be run
* after the specified amount of time elapses.
(前后的懂,下面这句就悲催了)
* The runnable will be run on the thread to which this handler
* is attached.


==========

网上说 每 delayMillis 执行一次, 为啥我测试一下 只执行一次?

这是为啥?
=========================

还有哪位明白人顺便把post 等该方法中的postAtTime等其他方法也解释一下

不胜感激
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
-droidcoffee-
Android 80,489 成员 91,375 内容