"What is an Android Spinner?" – A common question with a less than obvious answer. In this article, we look at what an Android Spinner is and where it is used.
An Android spinner is actually a dropdown. It's a handy user interface component that allows a user to select a value from a list of options.
It's so similar that the material guidelines no longer use the word spinner and instead only detail usage of 'dropdowns'.
A spinner starts with the default value shown and tapping it opens a list of options from which the user can select.
The easiest way to understand Android spinners is to look in the Android developer docs or see them in action below.
2 good spinner Android examples are in the YouTube app and Gmail app.
In the YouTube app, a spinner is used on the subscriptions tab to select what content we want to see.
Gmail
In the Gmail app, a spinner on the composer screen allows us to select from which address we want to send an email.
The term 'spinner' actually comes from older graphical interface elements used to show a range of options vertically. When Android was initially developed, it also adopted the same naming but has since evolved to use the word dropdown. Although now seen as a legacy term, it's baked so far into the core of Android that it still crops up.
Where the confusion usually lies is that the most common animation used for loading is a spinning circle. Quite logically, an appropriate name for that animation would be "a spinner".
According to the Material Guidelines, the proper name for loading animations is 'Progress Indicators.'
You get 2 distinct categories of progress indicators; indeterminate and determinate.
Indeterminate - means that there is an unspecified wait time. So the animation loops round and round until whatever is loading has finished.
Determinate - means that the wait time is known. The animation shows progress and how far through the wait time you are.
The guidelines also tell us that within the material world, there are commonly 2 shapes used for loading animations.
Linear - is a line used to show progress.
Circular - is, wait for it..., a circle used to show progress.
So now we know that it's a "circular indeterminate progress indicator" that is often wrongly referred to as a spinner in Android. Simple.
But more importantly, we know it's best to think of an Android spinner as a dropdown.
Search over 300 blog posts from our team
Subscribe to our monthly digest of blogs to stay in the loop and come with us on our journey to make things better!