You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device: realme realme C12
Android Version: 30
AppVersion: Version 4.2.2 (6121)
User ID: fd87d2bb-6690-49ec-ba5e-ec9fe6eaf0ff
Level: 3
Class: warrior
Is in Inn: false
Uses Costume: false
Custom Day Start: 0
Timezone Offset: -330
Details:
When I try to open the app in landscape mode and then switch to portrait mode right before the logo disappears and the app menu shows the side panel is open and I can't close it and the app isn't loaded properly and won't respond either.
steps to reproduce:
fully close habitica app if it's open
hold phone in landscape mode when on the phone's home screen
launch the habitica app
app should be in landscape mode
turn phone back to portrait mode
The text was updated successfully, but these errors were encountered:
I recently switched to a foldable device and this issue is way worse for those devices. If you open habitica with the device unfolded you get the nice wide layout, but when you close it, you get the layout as pictured above.
What is happening here is that the MainActivity has 2 layouts, one for normal screens and one for wide screens. When the device is rotated the screen is wider so that one gets used.
The last bit there tells the system to notify the activity when the orientation changes instead of recreating it. The activity doesn't actually have any code to handle this though.
This means that then app is opened, it ends up using whichever layout is appropriate for the current orientation/screen size, and then it never changes until the Activity is recreated. Since you spend 90% of your time in just this 1 Activity that doesn't happen very often.
There is a commit from a while back mentioning that screenSize and such were added to improve multi window behavior, but it is unclear to me why MainActivity would ever ignore orientation changes.
Removing that bit ca
EanLombardo
added a commit
to EanLombardo/habitica-android
that referenced
this issue
Oct 1, 2024
MainActivity defines an alternate layout for screen more than 600dp wide, but was ignoring orientation changes.
This caused a bug where if the application was opened with a wide orientation, but then the orientation changed to a small one, the user would be presented with the wide layout compressed into an unusable screen.
fixesHabitRPG#2002
MainActivity defines an alternate layout for screen more than 600dp wide, but was ignoring orientation changes.
This caused a bug where if the application was opened with a wide orientation, but then the orientation changed to a small one, the user would be presented with the wide layout compressed into an unusable screen.
fixesHabitRPG#2002
steps to reproduce:
The text was updated successfully, but these errors were encountered: