Closed hrehfeld closed 3 years ago
Looked into source, this app forces portrait mode with this command:
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
It appears that it was never designed to support landscape.
IMO this is rather a feature request than a bug.
To support landscape the app would need additional layout resources to rearrange the UI components accordingly. Also it might require additional code to store and reload the activity state when screen orientation changes.
This is not impossible to do, but it will require more effort than just removing the portrait mode flag.
I assume that the cause is that the screen orientation is set after creation of the activity (L108), i.e. the activity is created in landscape, then turned: https://github.com/corona-warn-app/cwa-app-android/blob/970e8b859cff3c8beeca83ac83e9ed534927107a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/CoronaWarnApplication.kt#L97-L109
Adding android:screenOrientation="portrait"
to the corresponding activity-tag in the AndroidManifest.xml
may fix this issue/create and lock the activity in portrait mode.
To clarify: Please support landscape mode, so that as many people as possible can use the app on phones with broken screens. If part of your touchscreen is broken, you can rotate the app to press buttons with other parts of your physical touch screen.
This would allow for:
i.e. it might help with wide-spread usage of the app.
@hrehfeld Ah, sorry. Mixed two topics.
@hrehfeld Thank you for your input! Unfortunately, @jbauerrfid is right: this application was designed for portrait mode. But the landscape mode is already in our backlog and I will report your points to the team. I will keep this issue open, so we could update you as soon as there would be any news. Thank you.
Since landscape mode is a feature request that touches both applications, we will move it to the wishlist repository.
Why do we need to bother with landscape mode for a fire-and-forget app (name coined by an owner in another issue)?! Especially for phones and such a simple app this is not really needed. There are wy more important features to develop.
I specifically gave a reason in the first post:
People using their old phones with broken screens is the main reason this is important. Especially if your main phone is google free...
E.g. the new screens added in one of the previous updates are not touchable on my spare phone's broken screen. My grandma doesn't have CWA because I can't give her this phone with the app running.
Oh interesting reason π Never though as app developer that screen rotation makes sense because of this. Thx for the hint π
Here are some additional thoughts I mentioned to the maintainers of the CCTG fork (who suggested I report this upstream):
180Β° rotation could be achieved quite easily and would be useful in use cases where the device is on a charger and I would like to move the cable to a position where it does not get in my way.
+/- 90Β° rotation is trickier as the UX might be less than satisfactory without additional UI changes.
For the main screen, which is essentially a tile-based layout, this could be addressed through a two-abreast layout (note that the suggestion refers to CCTG, CWA might look slightly different):
ββββββββββββββββββββββββββββββββββββββββββββββββββ
| Risk | Have you been tested? |
ββββββββββββββββββββββββββββββββββββββββββββββββββ
| Statistics (multiple tiles, scroll horizontally) |
ββββββββββββββββββββββββββββββββββββββββββββββββββ
| Contact Journal | FAQ |
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Neigboring tiles are already of similar heightβthe odd one out is the Donate tile, which is far taller than the others, and presumably the only one not present in upstream.
For the Overview activity, the graphic could go on one side of the screen, with the explanations in a column next to it. Definitions could be shown either underneath or in a third column.
App Information and Settings are similar to any Preferences activity on Android: at most, some padding on the sides may be required.
Exposure Notification and Prioritized Background Activity can be solved with a multi-column layout similar to Overview.
Notifications is essentially a Preferences screen with a graphic on top; the image and settings could be arranged in two columns.
While it does take some work to implement, it should be fairly straightforward and βmechanicalβ, one-off as long as the screen layouts do not change dramatically.
@mvglasow
180Β° rotation could be achieved quite easily and would be useful in use cases where the device is on a charger and I would like to move the cable to a position where it does not get in my way
I picked up this point and submitted a specific Android enhancement request https://github.com/corona-warn-app/cwa-app-android/issues/2274. I would also like to be able to have a charger connected and stand the device upright.
This bug was fixed by #738
Describe the bug
Screen rotation / landscape mode shows for
<
1 s, but immediately switches back to portrait.Expected behaviour
Show app in landscape mode.
Steps to reproduce the issue
Turn on screen rotation in system settings.
Turn phone so it shows desktop (seperate setting) or any other app in landscape mode.
Open CWA.
[ Screen shows in landscape, then immediately switches back to portrait. ]
Technical details
Additional context
People using their old phones with broken screens is the main reason this is important. Especially if your main phone is google free... :crying_cat_face:
Internal Tracking Id: EXPOSUREAPP-2109