akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

In-app locale change might end up in endless 'flickering' #151

Closed ichinaski closed 8 years ago

ichinaski commented 10 years ago

Context: The app locale switch is essence a little hack, as Android apps are not meant to change the locale in runtime. We did this to have all the settings built into the app, without forcing users to interact with the device's settings -- https://github.com/akvo/akvo-flow-mobile/issues/20

Now, the problem arises when changing the locale and then rotating the device

The flickering is basically and endless loop of activity restarting (each blink means the Activity is fully destroyed and recreated)

How to reproduce it: You can see the behaviour in your device (albeit it might only occur in some android versions) by: 1 - Using a locale different from the one in you device (i.e. Spanish) 2 - Using the app normally. As soon as you rotate, the issue should appear

(Possible) Solution: For all Activities in the app, we can tell the system not to handle locale nor layoutDirection changes automatically, preventing the device from restarting the Activity.

rumca commented 10 years ago

Tested version 2.0.2 on UAT and the above test steps no longer produce the flickering issue.

ichinaski commented 8 years ago

@rumca We found out this issue happens with the recently added setup screen (first time you run the app). The problem was exactly the same one described here, and so was the fix. I'll add this to the release test steps.

rumca commented 8 years ago

Can't replicate the flickering issue any more :+1: