private Message getPostMessage(java.lang.Runnable r) { Message m = Message.obtain(); m.callback = r; return(m); }
/// <summary> /// Sends a Message containing only the what value, to be delivered /// at a specific time. /// </summary> /// <remarks> /// Sends a Message containing only the what value, to be delivered /// at a specific time. /// </remarks> /// <seealso cref="sendMessageAtTime(Message, long)">sendMessageAtTime(Message, long) /// </seealso> /// <returns> /// Returns true if the message was successfully placed in to the /// message queue. Returns false on failure, usually because the /// looper processing the message queue is exiting. /// </returns> public bool sendEmptyMessageAtTime(int what, long uptimeMillis) { Message msg = Message.obtain(); msg.what = what; return(sendMessageAtTime(msg, uptimeMillis)); }
/// <summary> /// Sends a Message containing only the what value, to be delivered /// after the specified amount of time elapses. /// </summary> /// <remarks> /// Sends a Message containing only the what value, to be delivered /// after the specified amount of time elapses. /// </remarks> /// <seealso cref="sendMessageDelayed(Message, long)"></seealso> /// <returns> /// Returns true if the message was successfully placed in to the /// message queue. Returns false on failure, usually because the /// looper processing the message queue is exiting. /// </returns> public bool sendEmptyMessageDelayed(int what, long delayMillis) { Message msg = Message.obtain(); msg.what = what; return(sendMessageDelayed(msg, delayMillis)); }
private Message getPostMessage(java.lang.Runnable r, object token) { Message m = Message.obtain(); m.obj = token; m.callback = r; return(m); }
/// <summary> /// Same as /// <see cref="obtainMessage()">obtainMessage()</see> /// , except that it also sets the what, obj, arg1,and arg2 values on the /// returned Message. /// </summary> /// <param name="what">Value to assign to the returned Message.what field.</param> /// <param name="arg1">Value to assign to the returned Message.arg1 field.</param> /// <param name="arg2">Value to assign to the returned Message.arg2 field.</param> /// <param name="obj">Value to assign to the returned Message.obj field.</param> /// <returns>A Message from the global message pool.</returns> public Message obtainMessage(int what, int arg1, int arg2, object obj) { return(Message.obtain(this, what, arg1, arg2, obj)); }
/// <summary> /// Same as /// <see cref="obtainMessage()">obtainMessage()</see> /// , except that it also sets the what member of the returned Message. /// </summary> /// <param name="what">Value to assign to the returned Message.what field.</param> /// <returns>A Message from the global message pool.</returns> public Message obtainMessage(int what) { return(Message.obtain(this, what)); }
/// <summary> /// Returns a new /// <see cref="Message">Message</see> /// from the global message pool. More efficient than /// creating and allocating new instances. The retrieved message has its handler set to this instance (Message.target == this). /// If you don't want that facility, just call Message.obtain() instead. /// </summary> public Message obtainMessage() { return(Message.obtain(this)); }