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

add docs on android limitation for screen orientations #165021

Merged
merged 2 commits into from
Mar 13, 2025

Conversation

ash2moon
Copy link
Contributor

Resolves #99149

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Mar 11, 2025
@ash2moon ash2moon added the platform-android Android applications specifically label Mar 11, 2025
@camsim99 camsim99 requested a review from a team March 11, 2025 23:36
Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

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

mostly lgtm just 1 question

/// - landscapeRight
/// - landscapeLeft, landscapeRight
/// - portraitUp, landscapeLeft, landscapeRight
/// - portraitUp, portraitDown, landscapeLeft, landscapeRight
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming this list is based on https://developer.android.com/guide/topics/manifest/activity-element.html#screen, but I can't tell which mode corresponds to

portraitUp, landscapeLeft, landscapeRight

apologies if I'm missing it but can you clarify which of the modes corresponds to this combination

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just added some more docs to list what each corresponds to. For portraitUp, landscapeLeft, landscapeRight
this corresponds to user

Copy link
Member

@gmackall gmackall Mar 12, 2025

Choose a reason for hiding this comment

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

Hmm is this from manual testing, or are you inferring from the diff between this and the fullUser docs?

Just going on the user docs, the sentence

Use the user's current preferred orientation of the handset. Corresponds to ActivityInfo.SCREEN_ORIENTATION_USER.

Does not clearly tell me that this = {portraitUp, landscapeLeft, landscapeRight}

Copy link
Member

Choose a reason for hiding this comment

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

If it is being informed by the portion from the fullUser/fullSensor docs, I'd add a note that it's not true on all devices:

This allows any of the 4 possible rotations, regardless of what the device will normally do (for example some devices won't normally use 180 degree rotation).

as this indicates to me that user/sensor won't use 180 on some devices, but WILL on others.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am getting this from manual testing and reading the engine code. Would be it be safe to assume that if someone wanted to read more on the specifics of what 'user' value does, they would click the link in my documentation that points to the Android docs on what 'user' actually means?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I think what you've documented is reasonable and we can leave the rest to the android docs.

@github-actions github-actions bot removed the platform-android Android applications specifically label Mar 12, 2025
@ash2moon ash2moon added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 13, 2025
Merged via the queue into flutter:master with commit 0aa0ad1 Mar 13, 2025
74 of 75 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] SystemChrome.setPreferredOrientations doesn't set more than one orientation
2 participants