Skip to content

Fix for issue 52#60

Open
duki994 wants to merge 2 commits intoAndreiLux:masterfrom
duki994:master
Open

Fix for issue 52#60
duki994 wants to merge 2 commits intoAndreiLux:masterfrom
duki994:master

Conversation

@duki994
Copy link
Copy Markdown
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

duki994 added 2 commits August 9, 2016 15:25
…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