Skip to content

CollectionView does not respect content SafeAreaEdges choices (Regression for Android, different problem in iOS) #33604

@asi-evin

Description

@asi-evin

Description

The safe Area of Content inside of a CollectionView is not respected differently on both platforms.

Steps to Reproduce

  1. 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)
  1. 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).
  2. 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...)

Image

Here's Android on MAUI version 10.0.30

Image

Here's iOS (either version). Note that the gray backgrounds are NOT extending to the edges as desired:

Image

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.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    i/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosregressed-in-10.0.10s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions