Handler.ObtainMessage Handler.ObtainMessage Method

Definition

Overloads

ObtainMessage() ObtainMessage()

Returns a new Message from the global message pool.

ObtainMessage(Int32) ObtainMessage(Int32)

Same as ObtainMessage(), except that it also sets the what member of the returned Message.

ObtainMessage(Int32, Object) ObtainMessage(Int32, Object)

Same as ObtainMessage(), except that it also sets the what and obj members of the returned Message.

ObtainMessage(Int32, Int32, Int32) ObtainMessage(Int32, Int32, Int32)

Same as ObtainMessage(), except that it also sets the what, arg1 and arg2 members of the returned Message.

ObtainMessage(Int32, Int32, Int32, Object) ObtainMessage(Int32, Int32, Int32, Object)

Same as ObtainMessage(), except that it also sets the what, obj, arg1,and arg2 values on the returned Message.

ObtainMessage() ObtainMessage()

Returns a new Message from the global message pool.

[Android.Runtime.Register("obtainMessage", "()Landroid/os/Message;", "")]
public Android.OS.Message ObtainMessage ();
member this.ObtainMessage : unit -> Android.OS.Message

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ObtainMessage(Int32) ObtainMessage(Int32)

Same as ObtainMessage(), except that it also sets the what member of the returned Message.

[Android.Runtime.Register("obtainMessage", "(I)Landroid/os/Message;", "")]
public Android.OS.Message ObtainMessage (int what);
member this.ObtainMessage : int -> Android.OS.Message

Parameters

what
Int32 Int32

Value to assign to the returned Message.what field.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ObtainMessage(Int32, Object) ObtainMessage(Int32, Object)

Same as ObtainMessage(), except that it also sets the what and obj members of the returned Message.

[Android.Runtime.Register("obtainMessage", "(ILjava/lang/Object;)Landroid/os/Message;", "")]
public Android.OS.Message ObtainMessage (int what, Java.Lang.Object obj);
member this.ObtainMessage : int * Java.Lang.Object -> Android.OS.Message

Parameters

what
Int32 Int32

Value to assign to the returned Message.what field.

obj
Object Object

Value to assign to the returned Message.obj field.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ObtainMessage(Int32, Int32, Int32) ObtainMessage(Int32, Int32, Int32)

Same as ObtainMessage(), except that it also sets the what, arg1 and arg2 members of the returned Message.

[Android.Runtime.Register("obtainMessage", "(III)Landroid/os/Message;", "")]
public Android.OS.Message ObtainMessage (int what, int arg1, int arg2);
member this.ObtainMessage : int * int * int -> Android.OS.Message

Parameters

what
Int32 Int32

Value to assign to the returned Message.what field.

arg1
Int32 Int32

Value to assign to the returned Message.arg1 field.

arg2
Int32 Int32

Value to assign to the returned Message.arg2 field.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ObtainMessage(Int32, Int32, Int32, Object) ObtainMessage(Int32, Int32, Int32, Object)

Same as ObtainMessage(), except that it also sets the what, obj, arg1,and arg2 values on the returned Message.

[Android.Runtime.Register("obtainMessage", "(IIILjava/lang/Object;)Landroid/os/Message;", "")]
public Android.OS.Message ObtainMessage (int what, int arg1, int arg2, Java.Lang.Object obj);
member this.ObtainMessage : int * int * int * Java.Lang.Object -> Android.OS.Message

Parameters

what
Int32 Int32

Value to assign to the returned Message.what field.

arg1
Int32 Int32

Value to assign to the returned Message.arg1 field.

arg2
Int32 Int32

Value to assign to the returned Message.arg2 field.

obj
Object Object

Value to assign to the returned Message.obj field.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to