Xamarin Android - AbsSpinner

January 4, 2018 Oclemy Xamarin Spinner 1 minute, 3 seconds

AbsSpinner is the parent class for spinner widget.

Spinner is a view that allows us display items in a dropdown manner, allowing user pick a single item at a time.

Spinners are the equivalence of a ComboBox in say WinForms or Swing programming.

Uses of Xamarin Android AbsSpinner

No. Use
1. Define an ISpinnerAdapter property to be overriden by inheritters.
2. Define a public method: SetSelected(int pos) that allows it's children to overrode it so as to jump directly to a specific item in the spinner.

Programmatic Definition

AbsSpinner belongs to Android.Widget namespace.

namespace Android.Widget

The fact that this class has abstract methods means it's also abstrcat.

public abstract class AbsSpinner...{}

AbsSpinner class is an adapterview.

public abstract class AbsSpinner : AdapterView<ISpinnerAdapter>{}

So it's children will rely on ISpinnerAdapter for binding of data.

AbsSpinner has existed since the first release of Android, API Level 1.

You won't use this class in your day to day projects since it's a base class meant to provide abstraction to the spinner class. Instead you'll use spinner.

This class has two children:

Subclass Description
Spinner used to provide a quick way to select a single value from a set.
Gallery A View that shows items in a center-locked, horizontally scrolling list.DEPRECATED IN API LEVEL 16.