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

[Pixel Fold] When using upside-down, screen flips when navigating to camera screen #1

Closed
JolandaVerhoef opened this issue Dec 15, 2023 · 4 comments
Assignees

Comments

@JolandaVerhoef
Copy link
Contributor

  • Run the app on a Pixel Fold (API 34) emulator

  • Set the foldable to half-open and in "virtual sensors" set the screen rotation to 180 degrees:
    Screenshot 2023-12-15 at 09 45 55Screenshot 2023-12-15 at 09 46 34

  • Navigate to Sheep chat

  • Press the camera icon

Expected:
Camera screen is opened in the same orientation

Actual:
The screen turns 180 degrees

Screen.Recording.2023-12-15.at.09.48.18.mov
@donovanfm donovanfm self-assigned this Jan 17, 2024
@donovanfm
Copy link
Contributor

donovanfm commented Feb 26, 2024

Hey, Jolanda. Thanks for reporting this. However, it might not be something we can fix. The camera screen is not like other UIs, in that the layout shouldn't change when the device is rotated. Here are some reasons.

  1. The main UI component is the camera preview, which we want to be as big as possible. Since the camera sensor and screen are not squares (and the long edge of the camera sensor must be on the long edge of the screen), the default orientation is the best fit, which on most devices is portrait.
  2. The shutter button and other controls should be in a predictable place. Even a phone rotation (or acceleration change from being on a train, etc.) shouldn't move the shutter button. This behavior even matches the Pixel native camera. If you open it with the phone upside down, the shutter button is at the top and all of the button labels are upside down. (Edit: this only holds true on certain devices, not necessarily the Pixel Fold or Pixel Tablet. See Alex's comment below. Whether or not it's always implemented, keeping the shutter button in 1 place is still a good design decision.)
  3. Not all devices define the default orientation as portrait. For example, the Pixel Fold has a default orientation of portrait when it's folded, and landscape when it's unfolded. This is why we opted for SCREEN_ORIENTATION_NOSENSOR on the camera screen instead of SCREEN_ORIENTATION_SENSOR_PORTRAIT or SCREEN_ORIENTATION_USER_PORTRAIT.

All of these considerations combined are why we went with SCREEN_ORIENTATION_NOSENSOR. I checked with @romanofranz about updating SociaLite to support 0º and 180º orientations, but given the number of devices with different default orientations, he's concerned we'd introduce more bugs by trying that.

I'll close this as WAI for now, but happy to discuss further if you have more thoughts.

@donovanfm donovanfm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@alexvanyo
Copy link

This behavior even matches the Pixel native camera.

This doesn't match the Pixel native camera behavior when using the inner screen of the Pixel Fold or the Pixel Tablet. In either of those situations, the shutter button does move as the device is rotated.

@donovanfm
Copy link
Contributor

Thanks for the additional context, Alex. I updated my comment above to incorporate that. I still believe this is WAI from a camera perspective, but if the Large Screens team wants to author a fix that won't introduce more bugs on different form factors, I'd be happy to take a look.

@romanofranz
Copy link

romanofranz commented Feb 27, 2024

I added a patch in #26.
We are not changing the position of the shutter at this time, but at least the "video/photo" text now rotates for better readability in different orientations

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

No branches or pull requests

4 participants