Skip to content

Spinner

Category Requires Version
User Interface API 21, Android 5.0 Lollipop 3

Overview

A spinner component that displays a pop-up with a list of elements. These elements can be set in the Designer or Blocks Editor by setting theElementsFromString property to a string-separated concatenation (for example, choice 1, choice 2, choice 3) or by setting the Elements property to a List in the Blocks editor. Spinners are created with the first item already selected. So selecting it does not generate an After Picking event. Consequently it's useful to make the first Spinner item be a non-choice like "Select from below...".

Events

After Selecting

Event called after the user selects an item from the dropdown list.

Params
selection Text

Methods

Display Dropdown

displays the dropdown list for selection, same action as when the user clicks on the spinner.

Properties

Elements

List ➖ Read Write - Blocks

returns a list of text elements to be picked from.

Elements From String

Text Default: Item1, Item2, Item3 ➖ Write - Designer Blocks

Sets the Spinner list to the elements passed in the comma-separated string.

Font Bold

Boolean Default: False ➖ Write - Designer

Property for FontBold

Font Italic

Boolean Default: False ➖ Write - Designer

Property for FontItalic

Font Size

Number Default: 18 ➖ Read Write - Designer Blocks

The text size of the spinner items.

Font Typeface

Number Default: 0 ➖ Write - Designer

Property for FontTypeface

Font Typeface Import

Available as Advanced Property

Text ➖ Write - Designer Blocks

Set a custom font.

Height

Number ➖ Read Write - Blocks

Specifies the component's vertical height, measured in pixels.

Height Percent

Number ➖ Write - Blocks

Specifies the component's vertical height as a percentageof the height of its parent Component.

Item Background Color

Color Default: #03A9F3FF  ➖ Read Write - Designer Blocks

Set the background color for the spinner items.

Item Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Set the text color for the spinner items.

Prompt

⚠ Deprecated

Text ➖ Write - Designer

Text with the current title for the Spinner window.

Prompt Item Color

Color Default: #CCCCCCFF  ➖ Read Write - Designer Blocks

Set the text color for the spinner items prompt/hint.

Selection

Text ➖ Read Write - Designer Blocks

Returns the current selected item in the spinner.

Selection Index

Number ➖ Read Write - Blocks

The index of the currently selected item, starting at 1. If no item is selected, the value will be 0.

Spinner Color

Color Default: #2196F2FF  ➖ Read Write - Designer Blocks

Set the text color for the spinner.

Spinner Text Size

Number Default: 14.0 ➖ Read Write - Designer Blocks

The size of the spinner selected text.

Text Alignment

Number Default: 0 ➖ Write - Designer

Property for TextAlignment

Use Prompt

Available as Advanced Property

Boolean Default: False ➖ Write - Designer Blocks

If true the first spinner item will be the prompt text.

Visible

Boolean Default: True ➖ Read Write - Designer Blocks

Returns true iff the component is visible.

Width

Number ➖ Read Write - Blocks

Specifies the component's horizontal width, measured in pixels.

Width Percent

Number ➖ Write - Blocks

Specifies the component's horizontal width as a percentageof the Width of its parent Component.


Last update: November 9, 2022