-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CollectionView does not respect content SafeAreaEdges choices (Regression for Android, different problem in iOS) #33604
Description
Description
The safe Area of Content inside of a CollectionView is not respected differently on both platforms.
Steps to Reproduce
- Create a CollectionView with Datatemplate that has the following properties:
- You want the the background to stretch to the edges (i.e a Grid with a gray background)
- You want the content to respect the notches and system bars (i.e. A header label inside the Grid)
- Set the "SafeAreaEdges" edges of your Datatemplate Grid (or whatever has your content) to "Container,None" (usually the CollectionView is protected on the top and bottom).
- Turn the phone sideways in landscape mode.
Expected Result: Content Background should fill the screen, Actual Content should respect notches and system bars.
Actual Result on Android: The Content fills the screen, ending up behind system bars and notches.
Actual Result on iOS: The Background AND the content ends up inside the safe area.
Here's a screenshot of the repo of the desired result. This is on MAUI version 10.0.1. Note the gray backgrounds stretch to fill the screen but the labels (with obnoxious aquimarine backgrounds for testing) stay in the safe area. There's also an extra top and bottom label used for testing to show safe area is working (the container is plum for these... sorry...)
Here's Android on MAUI version 10.0.30
Here's iOS (either version). Note that the gray backgrounds are NOT extending to the edges as desired:
Link to public reproduction project repository
https://github.com/asi-evin/CollectionViewSafeArea
Version with bug
10.0.30
Is this a regression from previous behavior?
For Android Yes, not for iOS.
Last version that worked well
10.0.1
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
None at this time.