save position during onResume and onPause