RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.81k stars 405 forks source link

fix: preview orientation in sensorLandscape #352

Closed alaeri closed 5 years ago

alaeri commented 5 years ago

Bug: When activity locked in sensorLandscape in AndroidManifest.xml, when the user rotates the device 180 degrees, most of the time the orientation of the preview will be upside down. The user needs to shake the device in order to reset the preview

Analysis: When the rotation happens the screen orientation has not been updated yet. Then the orientation does not update anymore (unless you shake the device)

Fix: Each time the orientation updates, also check if the screen orientation has updated too.

Diolor commented 5 years ago

Thanks! I will add some work on the top since I found a way to solve orientation issues.