In your Spinner
's onItemSelectedListener
, save the selected position.
You can store the position in the SharedPreferences
if you want the position to persist outside of the Activity's scope and after application restart. Or you can store it in a class variable if you want a temporary storage.
In your activity's onResume()
method retrieve the stored position and use
spinner.setSelection(int position);