sendMessage and sendEmptyMessage

来源:互联网 发布:google拼音 linux 编辑:程序博客网 时间:2024/05/24 03:09

/*** Sends a Message containing only the what value.*/public final boolean sendEmptyMessage(int what){  return sendEmptyMessageDelayed(what, 0);}



/*** Pushes a message onto the end of the message queue after all pending messages* before the current time. It will be received in {@link #handleMessage},* in the thread attached to this handler.*/public final boolean sendMessage(Message msg){  return sendMessageDelayed(msg, 0);}


sendEmptyMessage()只能放int型数据,而sendMessage可以放其他的数据。

原创粉丝点击