corona-warn-app / cwa-wishlist

Central repository to collect community feature requests and improvements. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
105 stars 14 forks source link

Screen rotation / landscape mode shows, but immediately switches back to portrait #86

Closed hrehfeld closed 3 years ago

hrehfeld commented 4 years ago

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

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

jbauerrfid commented 4 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.

ironjan commented 4 years ago

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.

hrehfeld commented 4 years ago

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.

ironjan commented 4 years ago

@hrehfeld Ah, sorry. Mixed two topics.

AlexanderAlferov commented 4 years ago

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

tkowark commented 4 years ago

Since landscape mode is a feature request that touches both applications, we will move it to the wishlist repository.

Blackjacx commented 3 years ago

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.

hrehfeld commented 3 years ago

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.

stherold commented 3 years ago

Oh interesting reason πŸ˜… Never though as app developer that screen rotation makes sense because of this. Thx for the hint πŸ‘

mvglasow commented 3 years ago

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.

MikeMcC399 commented 3 years ago

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

d4rken commented 3 years ago

This bug was fixed by #738