Allow app to display in reverse portrait mode
See original GitHub issueAvoid duplicates
- This enhancement request has not already been raised before Related to wishlist “Screen rotation / landscape mode shows, but immediately switches back to portrait” https://github.com/corona-warn-app/cwa-wishlist/issues/86
- Enhancement request is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in CWA-Wishlist This concerns specific Android settings, however the general enhancement may also apply to iOS
Current Implementation
If the device is held in portrait mode and rotated top to bottom the app display does not rotate with the device. (CWA Version 1.11.0.)
Suggested Enhancement
Allow the app to display in reverse portrait mode.
In https://github.com/corona-warn-app/cwa-app-android/blob/main/Corona-Warn-App/src/main/AndroidManifest.xml change all occurrences of
android:screenOrientation="portrait"
to
android:screenOrientation="userPortrait"
Expected Benefits
Many mobile devices have the charger socket at the bottom of the device. When a charger is connected it is easier to stand the device upside down when vertical viewing is preferred. Allowing the CWA app display to rotate to reverse portrait mode would enable viewing with a charger connected and with the device stood up.
Reference Information
android:screenOrientation
The value can be:
value | description |
---|---|
“portrait” | Portrait orientation (the display is taller than it is wide). |
“userPortrait” | Portrait orientation, but can be either normal or reverse portrait based on the device sensor and the user’s preference. Added in API level 18. |
See https://developer.android.com/guide/topics/manifest/activity-element.html#screen for full list of options.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top GitHub Comments
@dsarkar I have tried it on a physical device and I couldn’t see any problems. I can certainly submit a PR if you like. I would target release/1.13.x, not release/1.12.x since it is an enhancement, just in case there are any unexpected side-effects, to give time to check it out.
I tried two different Samsung Galaxy phones (A5 & A50), running Android 8 and 10 respectively and a Pixel 3a phone emulator running Android 10 and none of them responded to the attribute android:screenOrientation=“userPortrait” which according to the Android documentation https://developer.android.com/guide/topics/manifest/activity-element.html#screen should allow portrait and reverse portrait orientation. In fact only portrait was shown, not reverse portrait. The only device which went to reverse portrait display with this setting was a Samsung Galaxy Tablet A and tablets are not mainstream for CWA (see https://www.coronawarn.app/en/faq/#smartwatch).
It would be possible to allow the app to rotate to landscape left and right together with reverse portrait, but that is too big a change without dev discussion and agreement. It could easily open up multiple display issues even though at first glance CWA seems to display well in landscape mode.
So, regrettably I’m going to close this request. It was a nice-to-have enhancement request, but not essential.