I\'m having some problem with setSelection on a Spinner. I set the value to be pre-selected when the spinner is shown in code, but it has no effect and the first alternative
I had the same problem with a spinner inside a fragment : setSelection works correctly during the onCreate at first start of the activity, but not when I rotate the screen. I solved it by calling setSelection within the onViewStateRestored method of the fragment instead of calling it inside the onCreate method. I'm not sure but I think that you can't use setSelection until the view is fully loaded, even if you can findViewById it.