Repository navigation
Android 10 / Android Q Issues and Features #39858
Copy link
Copy link
Closed
Labels
customer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.customer: solarisframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-androidAndroid applications specificallyAndroid applications specifically
Description
This is a continuation of #32748, since it's preferable to have the complete list of to-dos for Android Q as its own issue rather than as part of a comment thread.
These are the different tasks that need to be completed to help myself keep track of progress and what else needs to be done. This will also help if I missed anything:
- Expose insets.systemGestureInsets on MediaQuery.of(context).systemGestureInsets
Done with Add MediaQuery.systemGestureInsets to support Android Q #37416 - This allows developers to place draggable widgets outside of the system gesture insets -
Expose setSystemGestureExclusionRects APISee Expose Android setSystemGestureExclusionRects and getSystemGestureExclusionRects #54397
This allows developers to change remove gestures from non-mandatory insets. After exposing the API to the framework, the next step would be to create a convenience widget that sends wraps itself in the exclusion rect. -
Expose getSystemGestureExclusionRects APISee Expose Android setSystemGestureExclusionRects and getSystemGestureExclusionRects #54397
Conversely, it would be good to have a way to query what system gesture exclusion rects have been set. - Android 10 not building on a physical device - see Flutter on Android 10 (API level 29) issues #39827 for more details
- New Android 10 activities transition - see [Android 10] New transition when opening new activities #39812 for more details
Edit: We don't plan to expose an API for mandatory system gesture insets, since they are a subset of the complete system gesture insets. Developers using system exclusion rects should follow a request to setSystemGestureExclusionRects() with getSystemGestureExclusionRects() and work with whatever exclusion rects the system granted, rather than assuming that the request was met.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
customer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.customer: solarisframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-androidAndroid applications specificallyAndroid applications specifically
Activity
PieterAelse commentedon Sep 5, 2019
Isn't the
setSystemGestureExclusionRectsalready done?flutter-team-archive/engine#11451
shihaohong commentedon Sep 5, 2019
@PieterAelse not quite -- it still needs to be properly exposed on the framework.
[-][Android Q] Expose Native Android gesture APIs[/-][+]Android 10 / Android Q Issues and Features[/+]bernaferrari commentedon Sep 16, 2019
Well.. I just found out that BottomNavigationBar works weirdly on iOS: it has a hard-coded padding for the bottom bar. This won't work on Android since the gesture/transparent bar can be of any size. I suggest a refactor to solve both issues (for example, using SafeArea).
shihaohong commentedon Sep 16, 2019
Hi @bernaferrari, could you clarify what you're expecting and what you actually get for iOS? I took a quick look at the
BottonNavigationBarimplementation and I'm under the impression that it's not hardcoded and uses MediaQuery's padding to determine the required spacing.For Android, you could use
MediaQuery.systemGestureInsetsto create this padding yourself.5 remaining items
Hixie commentedon Oct 29, 2019
We believe we've done the critical work, but there is still some work remaining.
slightfoot commentedon Oct 30, 2019
@Hixie Since the Pixel 4 release we have been having an issue with our latest app and the need to call setSystemGestureExclusionRects is required.
I see it's in the engine but it has not yet been been exposed though SystemChrome in the framework yet. Is there a reason why?
shihaohong commentedon Oct 30, 2019
@slightfoot Since get/setSystemGestureExclusionRects were methods that Android recommended against using unless absolutely necessary, so they were considered lower priority than the other features. This doesn't mean that we will not be finishing it up, but higher priority work came up for me so I had to sidestep to those in the meantime.
PieterAelse commentedon Feb 24, 2020
Any updates on this?
Btw, I'm not sure if there are any changes, but Android 11 developer preview 1 is already out.
shihaohong commentedon Feb 24, 2020
I'm planning on coming back to implement set/getSystemGestureExclusionRects soon now that some free time has opened up for me.
I'll take a look into the slated changes for Android 11, but so far, it doesn't seem like there's any significant changes like Android 10's system gesture insets. I've created an issue titled
Android 11 Issues and Featuresto collect these issues, so please put a comment down in #51365 if there's anything that catches anybody's eye!shihaohong commentedon Feb 29, 2020
After some discussion on the discord channel and an offline chat with @HansMuller, we've decided that it doesn't make sense to expose this via the framework and would be better for this to be a plugin because it is very specific to just one platform, and only Android 10+ versions of that one platform. I've closed the framework side PR and will likely revert the engine side ones
PieterAelse commentedon Mar 1, 2020
Sounds valid indeed.
Will that plugin be build by the Flutter team or is it some work for the community?
shihaohong commentedon Mar 2, 2020
@PieterAelse I'll need to figure that out myself, I haven't worked on plugins with the Flutter team before so I'll need to check with someone who is more familiar. I'll post here when I have more info!
shihaohong commentedon Mar 4, 2020
From the discussion so far, it sounds like it would be work for the community.
shihaohong commentedon Apr 9, 2020
Since the core work for this has been complete, I'm going to close out this issue. I opened a separate issue (#54397) to track implementing the exclusion rects API so for those interested in the feature, please move the conversation there :) Thank you!
lock commentedon Apr 25, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.