question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow app to display in reverse portrait mode

See original GitHub issue

Avoid 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeMcC399commented, Feb 5, 2021

@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.

0reactions
MikeMcC399commented, Feb 6, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Screen Rotation Control - Apps on Google Play
You can freely determine the orientation of the screen. You can control portrait, landscape, reverse portrait, reverse landscape the four directions.
Read more >
Rotate the screen on your iPhone or iPod touch - Apple Support
Tap the Portrait Orientation Lock button to make sure that it's off. Turn your iPhone or iPod touch sideways. If the screen still...
Read more >
Make android app to work in portrait or reverse portrait only
1 Answer 1 · 1. "fullSensor" lets app run in landscape mode. I only need portrait and reverse portrait mode. – Vijayendra. May...
Read more >
Control Screen Rotation for Individual Android Apps—No Root ...
Having the display orientation suddenly go from portrait to ... mode by default and let you customize rotation for other apps later on....
Read more >
Enable Reverse Portrait Mode - Poweramp Feature Requests
I'd like to see reverse portrait (upside-down) rotation enabled in the app or as a selectable option for Screen Orientation in Look and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found