-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Avoid restarting and restore state after performing landscape #20
Comments
I can't reproduce this behavior on my devices. Which library version and which device are you using? |
I'm using SNAPSHOT of material-intro. Regards On Mon, Mar 7, 2016 at 8:11 PM, Heinrich Reimer notifications@github.com
|
For me, it doesn't show the startup two times, but he is right with recreation. The FragmentManager normally cares about retaining Fragments, etc. This is broken with this library, which means Fragments are recreated each rotation, and that wastes power and CPU cycles. I think it will be pretty difficult adding proper fragment retaining support, but it will be worth it ;D |
Fun fact: if you rotate the device, the Fragments get recreated, but onCreateView doesn't get called, means permissionGranted is false, and doesn't get true, means you can't go forward anymore after rotation. |
Sadly, my fix doesn't fix the problem of my last comment. So we definitely need to rewrite the IntroActivity for proper instance saving and restoring support. |
I switched from using |
The main issue is that the displayed |
We could either try to detect if an old but matching |
(Accidentially closed the issue. Sorry for that!) |
Finally found a solution for the first approach without requiring an ID. Needs some polishing and will be a breaking change so stay tuned for a fix soon. |
When the phone is rotated into landscape the
material-intro
not only starts from the beginning, it creates a new instance of all the slides that is the intro is showed 2 times.The text was updated successfully, but these errors were encountered: