Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Improve screen rotation management #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

francoisfds
Copy link

Hello,

This pull request should fix the issue #55, please let me know if you have any questions.

Regards.

In order to keep track of fragment instances after screen rotation,
the "fragTags" attribute is introduced. This array contain 3 String
objects representing the tags of the tab fragments.
Thus, fragment updates are made using tags instead of references.

Moreover, this commit fixes the 'WindowLeaked' error which is thrown
when a screen rotation occurres during the display of the first run
dialog window. The fix involves the new WelcomeDialogFrament class
whose aim is to handle dialog instead of the StationListActivity.
Indeed DialogFragment behavior is told to be more appropriate by
this guide : https://developer.android.com/guide/topics/ui/dialogs.
Despite this trick, the AlertDialog.Builder is copied as is.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant