Skip to content

Conversation

Piinks
Copy link
Contributor

@Piinks Piinks commented Apr 27, 2021

This adds support for varying Android fullscreen modes, which affect the visibility of system ui overlays like the status and bottom navigation bars.

  • lean back - a fullscreen mode that brings system overlays into view by tapping anywhere on the screen
    • this tap is not received by the application
  • immersive - a fullscreen mode that brings system overlays into view by swiping at the edge of the screen
    • this swipe is not received by the framework
  • immersive sticky - a fullscreen mode that brings system overlays into view by swiping at the edge of the screen
    • this swipe is received by the framework
  • edge to edge - this makes the application take up the fullscreen, with the overlays hovering on top

For the first three modes, there is also a new callback exposed so developers can be notified when the system overlays change, and what state they are in.

Finally, this change also updates the SystemChromeStyle, adding the ability to override the translucent scrim that is automatically added in Android to ensure proper contrast with system overlays.

Engine side: flutter/engine#25785

Related Issues:

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 feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Apr 27, 2021
@google-cla google-cla bot added the cla: yes label Apr 27, 2021
@Piinks Piinks added a: fidelity Matching the OEM platforms better c: new feature Nothing broken; request for a new capability platform-android Android applications specifically a: quality A truly polished experience a: layout SystemChrome and Framework's Layout Issues e: device-specific Only manifests on certain devices f: material design flutter/packages/flutter/material repository. engine flutter/engine related. See also e: labels. labels May 11, 2021
@Kotlinovsky
Copy link

Any update on this PR?

@Piinks
Copy link
Contributor Author

Piinks commented Jun 3, 2021

Any update on this PR?

Yes! Thanks @Kotlinovsky! I've been away for a bit, but expect to push updates by tomorrow. :D

@Piinks
Copy link
Contributor Author

Piinks commented Jun 4, 2021

@goderbauer, I think this is ready for another look, I am just curious about what you think of the callback. I put it in the ServicesBinding.. which I think is ok? Wanted to know what you think before I fix up all the documentation and add the last few tests here.

@Piinks Piinks requested a review from goderbauer June 4, 2021 23:10
@Piinks Piinks added the customer: crowd Affects or could affect many people, though not necessarily a specific customer. label Jun 4, 2021
@Piinks Piinks changed the title [WIP/Framework] Support for Android Fullscreen Modes [Framework] Support for Android Fullscreen Modes Jun 8, 2021
@Piinks Piinks marked this pull request as ready for review June 8, 2021 21:16
Copy link
Contributor

@shihaohong shihaohong left a comment

Choose a reason for hiding this comment

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

Little nits here and there, but looks good to me!

@OliverRhyme
Copy link

Any updates with this PR?

@Piinks
Copy link
Contributor Author

Piinks commented Jun 24, 2021

Engine changes have landed, just waiting on the engine roll and this should be good to go! :)

@Piinks
Copy link
Contributor Author

Piinks commented Jun 25, 2021

Waiting a bit further for the engine change to roll to dev, there are some internal customers that are affected by the lower level java changes. Working on migrating them now.

@Piinks
Copy link
Contributor Author

Piinks commented Jun 28, 2021

Update: Still waiting on the roll. 🙂 🤞

@Piinks
Copy link
Contributor Author

Piinks commented Jun 28, 2021

The engine change is being reverted, so this is on hold again.

@Piinks
Copy link
Contributor Author

Piinks commented Jun 28, 2021

flutter/engine#27018 is the updated engine change

@Kotlinovsky
Copy link

Kotlinovsky commented Jul 3, 2021

Updates?

@Piinks
Copy link
Contributor Author

Piinks commented Jul 7, 2021

The cirrus customer shard here is experiencing merge conflicts, which is odd. I am going to revert the dart fixes (which are causing the conflicts) and see if it resolves the failure. I can add them back after or in a follow up change.

@Piinks
Copy link
Contributor Author

Piinks commented Jul 7, 2021

That did not seem to make a difference, putting them back.

@fluttergithubbot fluttergithubbot merged commit e9736ef into flutter:master Jul 8, 2021
@Zee2
Copy link

Zee2 commented Jul 8, 2021

Hallelujah. Holy **** I have been waiting so long for this to be fixed. Thank you. Phew.

@OliverRhyme
Copy link

What flutter version we could expect for this fix to be shipped?

@wiradikusuma
Copy link

Thank you!

Equally important: Since this issue has been around for ages, and many people have done workarounds, would be great if there's documentation explaining the canonical way of handling this. Not to mention, in Android, users can change the navigation mode to "classic" or "gesture" anytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: fidelity Matching the OEM platforms better a: layout SystemChrome and Framework's Layout Issues a: quality A truly polished experience c: contributor-productivity Team-specific productivity, code health, technical debt. c: new feature Nothing broken; request for a new capability c: tech-debt Technical debt, code quality, testing, etc. customer: crowd Affects or could affect many people, though not necessarily a specific customer. e: device-specific Only manifests on certain devices engine flutter/engine related. See also e: labels. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically
Projects
None yet
8 participants