engine icon indicating copy to clipboard operation
engine copied to clipboard

Detect android multiwindow

Open yaakovschectman opened this issue 1 year ago • 2 comments

Draft/demonstration of checking if the app is in multiwindow mode and changing the top padding value accordingly. Such a change would still require tests, and some way to differentiate between splitscreen and freeform. Currently using the hardcoded 40 logical pixels.

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 and the C++, Objective-C, Java style guides.
  • [ ] I listed at least one issue that this PR fixes in the description above.
  • [ ] I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [ ] I signed the CLA.
  • [ ] All existing and new tests are passing.

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

yaakovschectman avatar May 22 '24 21:05 yaakovschectman

cc @reidbaker

yaakovschectman avatar May 23 '24 20:05 yaakovschectman

After much struggling, I am able to call on the API methods newly introduced for level 35 that can be used to determine the bounding box of the content area. This means that we need not ruin the behavior of SafeArea on splitscreen mode in order to implement it for freeform mode. I will see shortly about getting this proof of concept (force?) pushed here. Doing so requires updated CIPD package dependencies that make the API 35 preview available, upgrading the gradle wrapper and android plugin versions, and updating the app's android/app/build.gradle to use the preview API.

yaakovschectman avatar Jun 24 '24 17:06 yaakovschectman

Should this pr be closed or does it still have some value?

reidbaker avatar Aug 13 '24 14:08 reidbaker