Select an item from a spinner

0

What method does a spinner have with a particular item selected, eg: I have the items: 1 2 3 and 4

and I want it to start with the '3' selected

    
asked by anonymous 23.02.2015 / 18:22

1 answer

1

Once you have programmatically created or got your Spinner through a layout, simply use the setSelection by passing the desired position as a parameter:

spinner.setSelection(2);
    
23.02.2015 / 18:35