다음을 통해 공유


ComponentName Constructors

Definition

Overloads

ComponentName(Parcel)

Instantiate a new ComponentName from the data in a Parcel that was previously written with #writeToParcel(Parcel, int).

ComponentName(Context, Class)

Create a new component identifier from a Context and Class object.

ComponentName(Context, String)

Create a new component identifier from a Context and class name.

ComponentName(String, String)

Create a new component identifier.

ComponentName(Parcel)

Instantiate a new ComponentName from the data in a Parcel that was previously written with #writeToParcel(Parcel, int).

[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")]
public ComponentName (Android.OS.Parcel? in);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")>]
new Android.Content.ComponentName : Android.OS.Parcel -> Android.Content.ComponentName

Parameters

in
Parcel

The Parcel containing the previously written ComponentName, positioned at the location in the buffer where it was written.

Attributes

Remarks

Instantiate a new ComponentName from the data in a Parcel that was previously written with #writeToParcel(Parcel, int). Note that you must not use this with data written by #writeToParcel(ComponentName, Parcel) since it is not possible to handle a null ComponentObject here.

Java documentation for android.content.ComponentName.ComponentName(android.os.Parcel).

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

ComponentName(Context, Class)

Create a new component identifier from a Context and Class object.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/Class;)V", "")]
public ComponentName (Android.Content.Context pkg, Java.Lang.Class cls);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/Class;)V", "")>]
new Android.Content.ComponentName : Android.Content.Context * Java.Lang.Class -> Android.Content.ComponentName

Parameters

pkg
Context

A Context for the package implementing the component, from which the actual package name will be retrieved.

cls
Class

The Class object of the desired component, from which the actual class name will be retrieved.

Attributes

Remarks

Create a new component identifier from a Context and Class object.

Java documentation for android.content.ComponentName.ComponentName(android.content.Context, java.lang.Class<?>).

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

ComponentName(Context, String)

Create a new component identifier from a Context and class name.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;)V", "")]
public ComponentName (Android.Content.Context pkg, string cls);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;)V", "")>]
new Android.Content.ComponentName : Android.Content.Context * string -> Android.Content.ComponentName

Parameters

pkg
Context

A Context for the package implementing the component, from which the actual package name will be retrieved.

cls
String

The name of the class inside of <var>pkg</var> that implements the component.

Attributes

Remarks

Create a new component identifier from a Context and class name.

Java documentation for android.content.ComponentName.ComponentName(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.

Applies to

ComponentName(String, String)

Create a new component identifier.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")]
public ComponentName (string pkg, string cls);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")>]
new Android.Content.ComponentName : string * string -> Android.Content.ComponentName

Parameters

pkg
String

The name of the package that the component exists in. Can not be null.

cls
String

The name of the class inside of <var>pkg</var> that implements the component. Can not be null.

Attributes

Remarks

Create a new component identifier.

Java documentation for android.content.ComponentName.ComponentName(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.

Applies to