Note: A limiting workaround from another, similar SO question\'s answer worked for me, but I am interested in finding a true solution. The workaround was to
public void onItemSelected(AdapterView> parent, View view, int position, long id)
adapterView
is referenced to Spinner
, not the item you clicked, you should cast the "view" parameter instead.
@Rock Lee After rotated the layout would be refresh, you should resetup the spinner in some callback function like onConfigurationChanged(Configuration newConfig), Android listview disappears after screen rotation