Screen rotation / landscape mode shows for < 1 s, but immediately switches back to portrait.
Show app in landscape mode.
Open CWA.
[ Screen shows in landscape, then immediately switches back to portrait. ]
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
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 馃憤
Most helpful comment
Looked into source, this app forces portrait mode with this command:
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.