Questions tagged [spinner]

Spinner is a widget that allows the user to select an item from a group, like a dropdown list.

A Spinner is a widget that allows the user to select an item from a group. It is similar to a dropdown list and will allow scrolling when the list exceeds the available vertical space on the screen.

Initial help

Code sample

Android design guide

5148 questions
504
votes
25 answers

How to change spinner text size and text color?

In my Android application, I am using spinner, and I have loaded data from the SQLite database into the spinner, and it's working properly. Here is the code for that. Spinner spinner = (Spinner) this.findViewById(R.id.spinner1); List list =…
Dinesh Anuruddha
  • 7,137
  • 6
  • 32
  • 45
464
votes
25 answers

Set selected item of spinner programmatically

I am working on an android project and I am using a spinner which uses an array adapter which is populated from the database. I can't find out how I can set the selected item programmatically from the list. For example if, in the spinner I have the…
Boardy
  • 35,417
  • 104
  • 256
  • 447
453
votes
17 answers

Android Spinner: Get the selected item change event

How can you set the event listener for a Spinner when the selected item changes? Basically what I am trying to do is something similar to this: spinner1.onSelectionChange = handleSelectionChange; void handleSelectionChange(Object sender){ …
Soni Ali
  • 18,464
  • 16
  • 44
  • 53
441
votes
25 answers

How to show loading spinner in jQuery?

In Prototype I can show a "loading..." image with this code: var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onLoading: showLoad, onComplete: showResponse} ); function showLoad () { ... } In jQuery, I can load a server…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
441
votes
33 answers

How to keep onItemSelected from firing off on a newly instantiated Spinner?

I've thought of some less than elegant ways to solve this, but I know I must be missing something. My onItemSelected fires off immediately without any interaction with the user, and this is undesired behavior. I wish for the UI to wait until the…
FauxReal
  • 4,762
  • 4
  • 21
  • 18
341
votes
25 answers

How to set selected item of Spinner by value, not by position?

I have a update view, where I need to preselect the value stored in database for a Spinner. I was having in mind something like this, but the Adapter has no indexOf method, so I am stuck. void setSpinner(String value) { int pos =…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
304
votes
7 answers

How to get Spinner value?

In Android, I am trying to get the selected Spinner value with a listener. What is the best way to get the spinner's value?
Sam Dutton
  • 14,775
  • 6
  • 54
  • 64
244
votes
8 answers

Hide Up & Down Arrow Buttons (Spinner) in Input Number - Firefox 29

On Firefox 28, I'm using works great because it brings up the numerical keyboard on input fields which should only contain numbers. In Firefox 29, using number inputs displays spin buttons at the right side of the field, which…
NereuJunior
  • 2,797
  • 3
  • 15
  • 9
211
votes
6 answers

Android: Create spinner programmatically from array

I'm all new to Android and I'm trying to create a spinner programmatically and feeding it with data from an array, but Eclipse gives me a warning that I can't handle. Here's what I got: This ArrayList holds the elements that should be in the…
Select0r
  • 12,234
  • 11
  • 45
  • 68
151
votes
17 answers

Android: How to bind spinner to custom object list?

In the user interface there has to be a spinner which contains some names (the names are visible) and each name has its own ID (the IDs are not equal to display sequence). When the user selects the name from the list the variable currentID has to be…
Niko Gamulin
  • 66,025
  • 95
  • 221
  • 286
120
votes
11 answers

How to add items to a spinner in Android?

How to add items to a spinner?
Jazz
107
votes
9 answers

How to hide one item in an Android Spinner

I am looking for a way to hide one item in an Android spinner widget. This would allow you to simulate a spinner with no items selected, and ensures that the onItemSelected() callback is always called for every item selected (if the hidden item is…
Georgie
  • 2,448
  • 2
  • 17
  • 13
103
votes
4 answers

Good NumericUpDown equivalent in WPF?

I'm looking for a simple NumericUpDown (a.k.a. number spinner) control in WPF. This seems to be another lacking control in WPF. There must be some existing ones out there and I don't like to re-invent the wheel.
devios1
  • 36,899
  • 45
  • 162
  • 260
96
votes
7 answers

How to set font custom font to Spinner text programmatically?

I have a ttf font file in my assets folder. I know how to use it for textviews with: Typeface externalFont=Typeface.createFromAsset(getAssets(), "fonts/HelveticaNeueLTCom-Lt.ttf"); textview1.setTypeface(externalFont); I have defined look for my…
DixieFlatline
  • 7,895
  • 24
  • 95
  • 147
87
votes
14 answers

WPF loading spinner

The goal is to display the information that the application is working. So I'm looking for an intelligent implementation sample of a loading spinner using WPF / MVVM.
fabien
  • 2,041
  • 1
  • 16
  • 19
1
2 3
99 100