Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landscape-Mode for RideView #335

Merged
merged 38 commits into from
Oct 27, 2023
Merged

Landscape-Mode for RideView #335

merged 38 commits into from
Oct 27, 2023

Conversation

kruegercharles
Copy link
Contributor

@kruegercharles kruegercharles commented Sep 29, 2023

See: https://trello.com/c/GLAILbH2

TODO

  • Set puk during ride to the left instead of the middle of the screen, based on saveBatteryMode
  • Fix MapBox-Infobutton not being clickable
  • If one opens the Android Statusbar during Ride, the Mapbox-Logo gets covered
  • Remove triangle at the bottom of the speedometer in landscape mode
  • Why is the speedometer on the motorola positioned further to the left than on my smartphone????????
  • Fix: Pressing on the speedometer doesn't correctly set the speed
  • End button should be on the left to make more space for the speedometer
  • Speedometer should fill the available vertical screen space
  • Finetune design in light and dark mode
  • Test on devices with different screen sizes
  • Why did my PR change the Position of the Mapbox Logo and AttributionButton on iOS??? (because SafeArea)
  • Fix position mapbox logo on Android without batterysavemode
  • Test on different devices: position mapbox and attribution botton without battersavemode
  • Test on iOS (also position center-button!)
  • Fix distortion when jumping to FeedbackView
  • Test if Screentracking still works in landscape mode (works!)
  • Clicking on traffic light should focus to the left (add offset)
  • Android top bar during ride mode (not battery safe mode enabled) should be transparent
  • iOS: With light mode there is a white bar on the bottom in RideView

After merging this PR in dev, we need to let the app build via XCodeCloud and then install via Testfight to test if XCodeCloud accepts the landscape-mode (or if we have to first set a flag somewhere)

Currently the landscape mode is buggy in iOS >= 16. This should be fixed when upgrading to a new Flutter Version (at least >= 3.10.6, preferably newer). We should keep this in mind.

@PhilippMatthes PhilippMatthes added the needs-discussion Needs discussion before further changes label Sep 30, 2023
@kruegercharles kruegercharles removed the needs-discussion Needs discussion before further changes label Oct 2, 2023
@kruegercharles kruegercharles force-pushed the landscape branch 2 times, most recently from 63e8b9b to eb665cf Compare October 2, 2023 13:39
@kruegercharles kruegercharles changed the title Enable Landscape-View for App Landscape-Mode for RideView Oct 9, 2023
@kruegercharles
Copy link
Contributor Author

image image image image

What do you think about the design @PhilippMatthes ?

@PhilippMatthes
Copy link
Member

I like it but the speedometer should fill the available vertical screen space

@PhilippMatthes
Copy link
Member

End button should be on the left to make more space for the speedometer

@kruegercharles kruegercharles marked this pull request as ready for review October 13, 2023 10:48
@PhilippMatthes
Copy link
Member

After merging this PR in dev, we need to let the app build via XCodeCloud and then install via Testfight to test if XCodeCloud accepts the landscape-mode (or if we have to first set a flag somewhere)

wdym?

@kruegercharles
Copy link
Contributor Author

After merging this PR in dev, we need to let the app build via XCodeCloud and then install via Testfight to test if XCodeCloud accepts the landscape-mode (or if we have to first set a flag somewhere)

wdym?

To enable landscape-mode for iOS, we had to set a flag in XCode (not just implement it within the app). Maybe we need to do the same when compiling through XCodeCloud.

@adeveloper-wq
Copy link
Member

Tested it on iPhone and Android. It works great. The only problem I found is that in landscape mode right now, we don't use the complete screen. On both, iPhone and Android, we are leaving out parts on the right and left that remain black. Is this caused by technical limitations of Flutter, or are we able to fix this? @kruegercharles

@adeveloper-wq
Copy link
Member

I found another problem. Currently, in landscape mode, clicking on traffic signals (to center them in the view) does not work as desired. @kruegercharles

@adeveloper-wq
Copy link
Member

One more problem: On Android, when not using energy-saving mode, there is a black bar at the top of the screen when using portrait mode (the map should use the whole screen, and the top system status bar should be visible).

Copy link
Member

@adeveloper-wq adeveloper-wq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments above

@kruegercharles
Copy link
Contributor Author

Tested it on iPhone and Android. It works great. The only problem I found is that in landscape mode right now, we don't use the complete screen. On both, iPhone and Android, we are leaving out parts on the right and left that remain black. Is this caused by technical limitations of Flutter, or are we able to fix this? @kruegercharles

I'm not sure but I would put this into another ticket.

@PhilippMatthes
Copy link
Member

Currently doesn't work on iOS. On the home view the rotation somehow is possible once after the app started (although the screen rotates back directly). The button idea was discarded?

@kruegercharles
Copy link
Contributor Author

kruegercharles commented Oct 20, 2023

Currently doesn't work on iOS. On the home view the rotation somehow is possible once after the app started (although the screen rotates back directly). The button idea was discarded?

I've just tried it and it works on Thomas's iPhone.

You have to enable landscape mode in XCode though: https://medium.com/pragmatic-programmers/set-the-supported-device-orientation-53b154385772

The button was discarded because we use the native landscape mode and in my understanding you can only force the landscape mode via button or use the native landscape mode via gyroscope, but not both.

@kruegercharles kruegercharles merged commit e2fd1c6 into dev Oct 27, 2023
1 check passed
@kruegercharles kruegercharles deleted the landscape branch October 27, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants