Android Guides | Samples

Android.Widget.Spinner Class

A view that displays one child at a time and lets the user pick among them.

See Also: Spinner

Syntax

[Android.Runtime.Register("android/widget/Spinner", DoNotGenerateAcw=true)]
public class Spinner : AbsSpinner, IDialogInterfaceOnClickListener, IDisposable

Remarks

A view that displays one child at a time and lets the user pick among them. The items in the Spinner come from the Adapter associated with this view.

See the Spinners guide.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.Spinner are listed below.

See Also: AbsSpinner

Public Constructors

Construct a new spinner with the given context's theme.
Construct a new spinner with the given context's theme and the supplied attribute set.
Construct a new spinner with the given context's theme and the supplied mode of displaying choices.
Construct a new spinner with the given context's theme, the supplied attribute set, and default style attribute.
Construct a new spinner with the given context's theme, the supplied attribute set, and default style.
Construct a new spinner with the given context's theme, the supplied attribute set, and default style.

Protected Constructors

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

Public Properties

DropDownHorizontalOffsetInt32. Get the configured horizontal offset in pixels for the spinner's popup window of choices.
DropDownVerticalOffsetInt32. Get the configured vertical offset in pixels for the spinner's popup window of choices.
DropDownWidthInt32. Get the configured width of the spinner's popup window of choices in pixels.
[read-only]
GravityGravityFlags. Describes how the selected item view is positioned.
[read-only]
PopupBackgroundDrawable. Get the background drawable for the spinner's popup window of choices.
PromptString.
PromptFormattedICharSequence.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

OnClick(IDialogInterface, Int32)
This method will be invoked when a button in the dialog is clicked.
SetGravity(GravityFlags)
Describes how the selected item view is positioned.
SetPopupBackgroundDrawable(Drawable)
Set the background drawable for the spinner's popup window of choices.
SetPopupBackgroundResource(Int32)
Set the background drawable for the spinner's popup window of choices.
SetPromptId(Int32)
Sets the prompt to display when the dialog is shown.