What would be the better way of handling this screen rotation ?
Delete that attribute.
If you find that you need to pass information from the old activity instance to the new one, on the configuration change, you can put data in the Bundle
you are passed in onSaveInstanceState()
, and use that data in onRestoreInstanceState()
to tailor your UI. In the case of a Spinner
, you can pass the selected position this way, restoring it in the new activity.