Set spinner index on the UI thread

-Use indexOf() instead of manual loop to find index of selected branch