Udostępnij za pośrednictwem


Intent.SetClassName Method

Definition

Overloads

SetClassName(Context, String)

Convenience for calling #setComponent with an explicit class name.

SetClassName(String, String)

Convenience for calling #setComponent with an explicit application package name and class name.

SetClassName(Context, String)

Convenience for calling #setComponent with an explicit class name.

[Android.Runtime.Register("setClassName", "(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;", "GetSetClassName_Landroid_content_Context_Ljava_lang_String_Handler")]
public virtual Android.Content.Intent SetClassName (Android.Content.Context packageContext, string className);
[<Android.Runtime.Register("setClassName", "(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;", "GetSetClassName_Landroid_content_Context_Ljava_lang_String_Handler")>]
abstract member SetClassName : Android.Content.Context * string -> Android.Content.Intent
override this.SetClassName : Android.Content.Context * string -> Android.Content.Intent

Parameters

packageContext
Context

A Context of the application package implementing this class.

className
String

The name of a class inside of the application package that will be used as the component for this Intent.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

Attributes

Remarks

Convenience for calling #setComponent with an explicit class name.

Java documentation for android.content.Intent.setClassName(android.content.Context, java.lang.String).

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.

See also

Applies to

SetClassName(String, String)

Convenience for calling #setComponent with an explicit application package name and class name.

[Android.Runtime.Register("setClassName", "(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;", "GetSetClassName_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual Android.Content.Intent SetClassName (string packageName, string className);
[<Android.Runtime.Register("setClassName", "(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;", "GetSetClassName_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member SetClassName : string * string -> Android.Content.Intent
override this.SetClassName : string * string -> Android.Content.Intent

Parameters

packageName
String

The name of the package implementing the desired component.

className
String

The name of a class inside of the application package that will be used as the component for this Intent.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

Attributes

Remarks

Convenience for calling #setComponent with an explicit application package name and class name.

Java documentation for android.content.Intent.setClassName(java.lang.String, java.lang.String).

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.

See also

Applies to