Spinner

Spinners are used to indicate that a part of the product is loading or performing a task when the amount of time needed is unknown.

Spinner

Maven Central Class reference Source code

Default

Day Night
Spinner component Spinner component - dark mode

Installation

Backpack Android is available through Maven Central. Check the main Readme for a complete installation guide.

Usage

The Spinner component can be used in both XML and Kotlin/Java

Example of a primary spinner in XML


                                                
                                                <net.skyscanner.backpack.spinner.BpkSpinner
                                                  android:layout_width="match_parent"
                                                  android:layout_height="wrap_content"
                                                  app:type="primary"
                                                  app:small="false" />

Example of a primary spinner in Kotlin


                                                
                                                import net.skyscanner.backpack.spinner.BpkSpinner
                                                
                                                BpkSpinner(context).apply {
                                                  type = BpkSpinner.Type.PRIMARY
                                                  small = false
                                                }

Theme Props

  • spinnerColor

Styles for the primary spinner can be changed globally through bpkSpinnerPrimaryStyle. Check theming for more information.