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

Fix for issue 52 #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix for issue 52 #60

wants to merge 2 commits into from

Conversation

duki994
Copy link
Contributor

@duki994 duki994 commented Aug 9, 2016

Fixes #52

Logcat showed that error happened while invoking onConfigurationChanged method in mDrawerToggle, but didn't provide crash info.
Forcing portrait layout until all fragments have been loaded fixes rotation bug on loading app.

setRequestedOrientation will block invoking onConfigurationChanged for orientation events, but screenSize changes when orientation is changed will invoke it, thus avoiding this bug and properly notifying mDrawerToggle.

Forcing orientation made (or rather exposed what was happening in #52 ) new bug. Each time user rotated screen while in settings menu, Synapse would crash with InstantiationException for MyPreferenceFragment.

I fixed this by moving MyPreferenceFragment class to separate file and passing settings activity context via variable Utils.settingsActivity.

This effectively fixed all bugs I have noticed related to #52

…ivity

Fixes AndreiLux#52

Logcat showed that error happened while invoking onConfigurationChanged method in mDrawerToggle, but didn't provide crash info.
Forcing portrait layout until all fragments have been loaded fixes rotation bug on loading app.

setRequestedOrientation will block invoking onConfigurationChanged for orientation events, but screenSize changes when orientation is changed will invoke it, thus avoiding this bug and properly notifying mDrawerToggle.
Commit:
464d92f fixed issue AndreiLux#52

That commit also made new bug (or rather exposed what was happening in AndreiLux#52).
On each rotation, Settings was unable to instantiate MyPreferenceFragment. Each time rotation changed while user was in settings menu, Synapse would crash due to InstantiationException

Fix this by moving MyPreferenceFragment out of Settings and making it outer standalone class.
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

Successfully merging this pull request may close these issues.

rotation bug at loading
1 participant