Udostępnij za pośrednictwem


Spinner Constructors

Definition

Overloads

Spinner(Context)

Constructs a new spinner with the given context's theme.

Spinner(Context, IAttributeSet)

Constructs a new spinner with the given context's theme and the supplied attribute set.

Spinner(Context, SpinnerMode)

Constructs a new spinner with the given context's theme and the supplied mode of displaying choices.

Spinner(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Spinner(Context, IAttributeSet, Int32)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

Spinner(Context, IAttributeSet, Int32, SpinnerMode)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

Spinner(Context, IAttributeSet, Int32, Int32, SpinnerMode)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default styles.

Spinner(Context, IAttributeSet, Int32, Int32, SpinnerMode, Resources+Theme)

Constructs a new spinner with the given context's theme.

Spinner(Context)

Constructs a new spinner with the given context's theme.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public Spinner (Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Widget.Spinner : Android.Content.Context -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

Attributes

Remarks

Constructs a new spinner with the given context's theme.

Java documentation for android.widget.Spinner.Spinner(android.content.Context).

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

Spinner(Context, IAttributeSet)

Constructs a new spinner with the given context's theme and the supplied attribute set.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public Spinner (Android.Content.Context? context, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Widget.Spinner : Android.Content.Context * Android.Util.IAttributeSet -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

Attributes

Remarks

Constructs a new spinner with the given context's theme and the supplied attribute set.

Java documentation for android.widget.Spinner.Spinner(android.content.Context, android.util.AttributeSet).

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

Spinner(Context, SpinnerMode)

Constructs a new spinner with the given context's theme and the supplied mode of displaying choices.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")]
public Spinner (Android.Content.Context? context, Android.Widget.SpinnerMode mode);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")>]
new Android.Widget.Spinner : Android.Content.Context * Android.Widget.SpinnerMode -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

mode
SpinnerMode

Constant describing how the user will select choices from the spinner.

Attributes

Remarks

Constructs a new spinner with the given context's theme and the supplied mode of displaying choices. mode may be one of #MODE_DIALOG or #MODE_DROPDOWN.

Java documentation for android.widget.Spinner.Spinner(android.content.Context, int).

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

Spinner(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected Spinner (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.Spinner : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.Spinner

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

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

Spinner(Context, IAttributeSet, Int32)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")]
public Spinner (Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")>]
new Android.Widget.Spinner : Android.Content.Context * Android.Util.IAttributeSet * int -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

defStyleAttr
Int32

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

Attributes

Remarks

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

Java documentation for android.widget.Spinner.Spinner(android.content.Context, android.util.AttributeSet, int).

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

Spinner(Context, IAttributeSet, Int32, SpinnerMode)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")]
public Spinner (Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, Android.Widget.SpinnerMode mode);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")>]
new Android.Widget.Spinner : Android.Content.Context * Android.Util.IAttributeSet * int * Android.Widget.SpinnerMode -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

defStyleAttr
Int32

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

mode
SpinnerMode

Constant describing how the user will select choices from the spinner.

Attributes

Remarks

Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute. mode may be one of #MODE_DIALOG or #MODE_DROPDOWN and determines how the user will select choices from the spinner.

Java documentation for android.widget.Spinner.Spinner(android.content.Context, android.util.AttributeSet, int, int).

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

Spinner(Context, IAttributeSet, Int32, Int32, SpinnerMode)

Constructs a new spinner with the given context's theme, the supplied attribute set, and default styles.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;III)V", "")]
public Spinner (Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, int defStyleRes, Android.Widget.SpinnerMode mode);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;III)V", "")>]
new Android.Widget.Spinner : Android.Content.Context * Android.Util.IAttributeSet * int * int * Android.Widget.SpinnerMode -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

defStyleAttr
Int32

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

defStyleRes
Int32

A resource identifier of a style resource that supplies default values for the view, used only if defStyleAttr is 0 or can not be found in the theme. Can be 0 to not look for defaults.

mode
SpinnerMode

Constant describing how the user will select choices from the spinner.

Attributes

Remarks

Constructs a new spinner with the given context's theme, the supplied attribute set, and default styles. mode may be one of #MODE_DIALOG or #MODE_DROPDOWN and determines how the user will select choices from the spinner.

Java documentation for android.widget.Spinner.Spinner(android.content.Context, android.util.AttributeSet, int, int, int).

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

Spinner(Context, IAttributeSet, Int32, Int32, SpinnerMode, Resources+Theme)

Constructs a new spinner with the given context's theme.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;IIILandroid/content/res/Resources$Theme;)V", "", ApiSince=23)]
public Spinner (Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, int defStyleRes, Android.Widget.SpinnerMode mode, Android.Content.Res.Resources.Theme? popupTheme);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;IIILandroid/content/res/Resources$Theme;)V", "", ApiSince=23)>]
new Android.Widget.Spinner : Android.Content.Context * Android.Util.IAttributeSet * int * int * Android.Widget.SpinnerMode * Android.Content.Res.Resources.Theme -> Android.Widget.Spinner

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

defStyleAttr
Int32
defStyleRes
Int32
popupTheme
Resources.Theme
Attributes

Remarks

Java documentation for android.widget.Spinner.Spinner(android.content.Context).

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