dotnet / dotnet/maui

LayoutChildren Method does not respect the values that are given in

Open
#7,668 13 comments 1 reaction 0 assignees View on GitHub
area-layout partner platform/android s/needs-attention s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

It's my understanding that by overriding the LayoutChildern of Contentpage let'sus to write custom code for layouting it's children, I am trying to layout the children such a way to avoid rendering over the android Navbar and the camera cutout but maui keeps placing them over the cutout/Navbar even if i give fixed values to layoutChildren method.

I am not really sure if this is how LayoutChildren is supposed to work. Please advise if I am wrong

### Steps to Reproduce

1. Create new Maui App
2. create a page that inherits from ContentPage
3. Override the LayoutChildren method and try to give your own fixed size
4. The given size is not respected, instead the whole display is used

### Version with bug

6.0 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Android

### Affected platform versions

Android 12

### Did you find any workaround?

No

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a new .NET MAUI app on Android 12 with a ContentPage that overrides LayoutChildren and supplies fixed bounds. Read the LayoutChildren implementation and related layout behavior to determine whether the supplied values are expected to control the full display area. Done means the behavior is corrected or clearly documented, with regression coverage if the existing tests identify a suitable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.