

String value = spinner.getSelectedItem().toString() Spinner spinner = (Spinner) findViewById(R.id.spinner) Get the selected item out a spinner using: It references to an array resource that will populate the Spinner.Ĭreate a spinner like any view and specify the android:entries attribute to specify the set of options: Dialog mode uses a dialog window for selecting spinner options and DropDown mode uses drop-down anchored to the Spinner for selecting spinner options. This property has two options: Dialog mode and DropDown mode. It defines display mode for spinner options. The prompt to display when the spinner’s dialog is shown. Some important properties of spinner are:


Spinner provides a quick way to select one value from a set of options (like select dropdowns in HTML).
