I get an error 
Type safety: The method getPosition(Object) belongs to the raw type ArrayAdapter. References to generic type ArrayAdapter<T> should be parameterized

on line

spinner.setSelection(myAdap.getPosition(value));