handler和message
来源:互联网 发布:php获取url文件名 编辑:程序博客网 时间:2024/06/03 22:38
Defines a message containing a description and arbitrary data object that can be sent to a Handler. This object contains two extra int fields and an extra object field that allow you to not do allocations in many cases.
While the constructor of Message is public, the best way to get one of these is to call Message.obtain() or one of the Handler.obtainMessage() methods, which will pull them from a pool of recycled objects.
翻译:
定义一个消息包含一个描述和任意的数据对象,可以发送到处理程序。这个对象包含两个额外的int字段和一个额外的对象字段允许您在许多情况下不分配。
虽然公共消息的构造函数,得到其中一个最好的方法是调用Message.obtain Handler.obtainMessage之一()或()方法,它将把他们从池中回收的对象。
Message.obtain()
).public int arg1
arg1 and arg2 are lower-cost alternatives to using setData()
if you only need to store a few integer values.
使用__arg1和包括低成本替代品setData()如果你只需要存储一些整数值。
public int arg2
arg1 and arg2 are lower-cost alternatives to using setData()
if you only need to store a few integer values.
这里面可以查看源码为什么不用Message message = new Message();
- handler和message传值两例
- handler和message
- Handler,Message和Looper
- Looper,Handler和Message。
- handler和message传值两例
- handler和message传值两例
- handler和message传值两例
- Handler和Message
- Thread、Looper、Handler和Message
- 线程,Handler,Message和Runnable
- 消息传递 handler和Message
- Handler和Message(一)
- Thread、Looper、Handler和Message
- Handler、Message 和 Activity.runOnUiThread()
- Android Looper Handler 和Message
- Android Handler、LOOP和Message
- Message,Handler,MessageQueue和Looper
- Thread和Looper以及Handler和Message
- 使用Java获得电脑各个分区下的所有文件名和路径
- 每日一算法之Fibonacci数
- QT容器类
- 【 题集 】 RPG专场练习赛
- 186 CONST的概念
- handler和message
- UIday03
- 0-1背包问题(动态规划)
- uvaoj1585oxooxx得分问题
- Android中ExpandableListView中含有Checkbox,Group长按事件无效,ChildItem长按事件有效
- 动态链接库与静态链接库
- 线性表的顺序查找
- 从公司回来忘带手机没有闹铃明早起来不了该怎么办?--- 花5分钟用ShellExecute写个闹铃即可!
- 11月份的疯言疯语