Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onRestart() is not called after rotation change #8

Open
zmeid opened this issue Aug 7, 2019 · 1 comment
Open

onRestart() is not called after rotation change #8

zmeid opened this issue Aug 7, 2019 · 1 comment

Comments

@zmeid
Copy link

zmeid commented Aug 7, 2019

How does the activity respond when the user rotates the screen?

When the screen is rotated, the current instance of activity is destroyed a new instance of the Activity is created in the new orientation. The onRestart() method is invoked first when a screen is rotated. The other lifecycle methods get invoked in the similar flow as they were when the activity was first created.

When rotation changes;

onPause()->OnStop()->OnDestroy->OnCreate()->onStart()->OnResume()

@saketp18
Copy link

onStart()->onRestoreInstanceState()->onResume()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants