手机版
你好,游客 登录 注册
背景:
阅读新闻

Android Runnable 用法

[日期:2010-08-17] 来源:Linux社区  作者:Linux [字体:大 中 小]

Android Runnable 用法

Runnable派生你的子类,重载run()方法。

然后调用View.post(myRunnableObj)即可把你的Runnable对象增加到UI线程中运行。

boolean android.view.View .post(Runnable action)

Causes the Runnable to be added to the message queue. The runnable will be run on the user interface thread.

Parameters:
action The Runnable that will be executed.
Returns:
Returns true if the Runnable was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting.

linux
相关资讯       Android 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* 匿名 发表于 2013/10/11 17:15:44
发送