Skip to content

[Android] Material 3 Fixed BottomNavigationView overflowing in Tabbed page#35064

Merged
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
NirmalKumarYuvaraj:fix-35063
Apr 23, 2026
Merged

[Android] Material 3 Fixed BottomNavigationView overflowing in Tabbed page#35064
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
NirmalKumarYuvaraj:fix-35063

Conversation

@NirmalKumarYuvaraj

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description of Change

This pull request addresses an issue where, on Android with Material3 enabled, TabbedPage bottom tabs were overflowing the content area. The changes ensure the correct bottom margin is applied for Material3 and add both a sample case and a UI test to verify the fix.

Bug fix:

  • Updated SetTabLayout() in TabbedPageManager.cs to apply the correct bottom margin depending on whether Material3 is enabled, using m3_bottom_nav_min_height for Material3 and design_bottom_navigation_height otherwise.

Testing:

  • Added a new sample page Issue35063 in TestCases.HostApp to reproduce the TabbedPage bottom tab overflow issue on Android.
  • Added a corresponding UI test in TestCases.Shared.Tests to verify that the bottom tabs do not overflow the content when Material3 is enabled.

Issues Fixed

Fixes #35063

Output

Before After
image image

@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35064

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35064"

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Apr 21, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review April 21, 2026 16:34
Copilot AI review requested due to automatic review settings April 21, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an Android layout regression when Material 3 is enabled and TabbedPage.ToolbarPlacement is set to Bottom, where the bottom navigation could overlap/overflow the content area by reserving too-small bottom space.

Changes:

  • Update TabbedPageManager.SetTabLayout() to apply a Material 3–specific bottom margin using m3_bottom_nav_min_height (fallback to design_bottom_navigation_height otherwise).
  • Add a new HostApp issue page (Issue35063) to reproduce the scenario.
  • Add a corresponding Android UI screenshot test under the Material3 test category.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Controls/src/Core/Platform/Android/TabbedPageManager.cs Uses the correct bottom-nav height resource when Material3 is enabled to prevent bottom tab overlap.
src/Controls/tests/TestCases.HostApp/Issues/Issue35063.cs Adds a TabbedPage repro page with bottom toolbar placement and stable AutomationIds.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35063.cs Adds an Android Material3 screenshot regression test for the repro page.

@sheiksyedm

Copy link
Copy Markdown
Contributor

/backport to release/10.0.1xx-sr6

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.1xx-sr6 (link to workflow run)

@sheiksyedm

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MauiBot

MauiBot commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI Summary

👋 @NirmalKumarYuvaraj — new AI review results are available. Please review the latest session below.

📊 Review Session4e06f1f · added test snapshot · 2026-04-23 10:19 UTC
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ ENV ERROR

Platform: ANDROID · Base: main · Merge base: 42d0dbfe

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue35063 Issue35063 ✅ FAIL — 647s ⚠️ ENV ERROR
🔴 Without fix — 🖥️ Issue35063: FAIL ✅ · 647s
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 1.01 sec).
  Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 4.72 sec).
  Restored /home/vsts/work/1/s/src/Core/src/Core.csproj (in 5.66 sec).
  Restored /home/vsts/work/1/s/src/Core/maps/src/Maps.csproj (in 1.04 sec).
  Restored /home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 48 ms).
  Restored /home/vsts/work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 32 ms).
  Restored /home/vsts/work/1/s/src/Controls/Foldable/src/Controls.Foldable.csproj (in 50 ms).
  Restored /home/vsts/work/1/s/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 770 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 41 ms).
  Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj (in 1.47 sec).
  1 of 11 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:06:43.15
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2.94 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 73 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 4.62 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 952 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 5.96 sec).
  Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 10 ms).
  Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 4.06 sec).
  5 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.19]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.62]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/22/2026 19:56:10 FixtureSetup for Issue35063(Android)
>>>>> 04/22/2026 19:56:13 Material3_TabbedPage_BottomTabsOverflowingContents Start
>>>>> 04/22/2026 19:56:19 Material3_TabbedPage_BottomTabsOverflowingContents Stop
>>>>> 04/22/2026 19:56:20 Log types: logcat, bugreport, server
  Failed Material3_TabbedPage_BottomTabsOverflowingContents [7 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/snapshots/android/Material3_TabbedPage_BottomTabsOverflowingContents.png
Ensure new snapshot is correct:    /home/vsts/work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/android/Material3_TabbedPage_BottomTabsOverflowingContents.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue35063.Material3_TabbedPage_BottomTabsOverflowingContents() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35063.cs:line 23
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

NUnit Adapter 4.5.0.0: Test execution complete

Total tests: 1
Test Run Failed.
     Failed: 1
 Total time: 46.6388 Seconds

🟢 With fix — 🖥️ Issue35063: ⚠️ ENV ERROR · 1579s

(truncated to last 15,000 chars)

ft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]

Build FAILED.

/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:  [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:15:19.75
* daemon not running; starting now at tcp:5037
* daemon started successfully
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:08:12.72
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.70-ci+azdo.13910932
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.12]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.30]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/22/2026 20:22:07 FixtureSetup for Issue35063(Android)
>>>>> 04/22/2026 20:22:10 Material3_TabbedPage_BottomTabsOverflowingContents Start
>>>>> 04/22/2026 20:22:15 Material3_TabbedPage_BottomTabsOverflowingContents Stop
>>>>> 04/22/2026 20:22:15 Log types: logcat, bugreport, server
  Failed Material3_TabbedPage_BottomTabsOverflowingContents [5 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/snapshots/android/Material3_TabbedPage_BottomTabsOverflowingContents.png
Ensure new snapshot is correct:    /home/vsts/work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/android/Material3_TabbedPage_BottomTabsOverflowingContents.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue35063.Material3_TabbedPage_BottomTabsOverflowingContents() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35063.cs:line 23
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

NUnit Adapter 4.5.0.0: Test execution complete

Test Run Failed.
Total tests: 1
     Failed: 1
 Total time: 27.1076 Seconds

⚠️ Issues found
  • ⚠️ Issue35063 with fix: Exception calling "Matches" with "2" argument(s): "Value cannot be null. (Parameter 'input')"
📁 Fix files reverted (1 files)
  • src/Controls/src/Core/Platform/Android/TabbedPageManager.cs

🔍 Pre-Flight — Context & Validation

Issue: #35063 - [Android] Material3 - TabbedPage bottom tabs overflowing the contents
PR: #35064 - [Android] Material 3 Fixed BottomNavigationView overflowing in Tabbed page
Platforms Affected: Android (Material3 enabled)
Files Changed: 2 implementation (TabbedPageManager.cs + snapshot), 2 test (Issue35063.cs × 2)

Key Findings

  • Root cause: SetTabLayout() always used design_bottom_navigation_height (56dp) as the content bottom margin, but the Material3 BottomNavigationView is 80dp tall (m3_bottom_nav_min_height), leaving 24dp of overlap.
  • Fix is a one-line ternary that selects the dimension resource based on RuntimeFeature.IsMaterial3Enabled.
  • Gate FAILED: The test (WaitForElement + VerifyScreenshot) did not properly detect the regression when the fix was removed — the label can be found by Appium even when visually obscured by the tab bar.
  • The test screenshot baseline was added in the same PR, so it only validates the fixed state, not regression.
  • The unrelated maui-pr-uitests CI failure is for WinUI UITests Controls WebView — pre-existing, not caused by this PR.
  • Both new test files are missing a trailing newline (\ No newline at end of file).

Code Review Summary

Verdict: LGTM
Confidence: high
Errors: 0 | Warnings: 1 | Suggestions: 2

Key code review findings:

  • ⚠️ TabbedPageManager.cs:271 — Line is ~215 chars; both branches duplicate the long GetDimensionPixelSize(...) call. Refactoring to extract the dimension ID first (as done in similar M3 checks elsewhere) would improve readability.
  • 💡 Both Issue35063.cs files are missing a trailing newline at end of file.
  • 💡 TestCases.Shared.Tests/Tests/Issues/Issue35063.cs has a double blank line between class brace and constructor.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35064 Use m3_bottom_nav_min_height for M3, design_bottom_navigation_height otherwise ⏳ Gate FAILED TabbedPageManager.cs + test files Original PR

🔬 Code Review — Deep Analysis

Code Review — PR #35064

Independent Assessment

What this changes: When a TabbedPage uses bottom tab placement on Android, the SetTabLayout() method now applies a different bottom margin to the content area depending on whether Material3 is enabled. Material3 uses m3_bottom_nav_min_height (80dp, via m3_comp_navigation_bar_container_height) instead of design_bottom_navigation_height (56dp). A UI test and snapshot baseline for android-notch-36 are added.

Inferred motivation: The Material3 BottomNavigationView is taller (80dp) than the legacy one (56dp), so the old fixed margin left the tab bar overlapping the page content. The fix selects the right dimension resource for each Material3 mode.


Reconciliation with PR Narrative

Author claims: Fixes bottom tab overflow when Material3 is enabled; uses m3_bottom_nav_min_height for M3 and keeps design_bottom_navigation_height for the legacy path.

Agreement: Matches the code exactly. The approach is consistent with the existing pattern (using the minHeight dimension resource from the Material library rather than measuring the live view). Both theme XML resources (m3_comp_navigation_bar_container_height = 80dp, design_bottom_navigation_height = 56dp) confirm the dimension values are correct.


Findings

⚠️ Warning — Line 271 is ~215 characters and duplicates a long call expression

TabbedPageManager.cs:271 is a single mega-line ternary. Both branches duplicate _context.Context.Resources.GetDimensionPixelSize(...), which obscures the logic and makes the diff hard to review. This is also inconsistent with how other RuntimeFeature.IsMaterial3Enabled checks in the codebase are structured (see ShellPageContainer.cs:29, which separates the branch logic).

Suggested refactor (2 lines):

var dimId = RuntimeFeature.IsMaterial3Enabled
    ? Resource.Dimension.m3_bottom_nav_min_height
    : Resource.Dimension.design_bottom_navigation_height;
SetContentBottomMargin(_context.Context.Resources.GetDimensionPixelSize(dimId));

💡 Suggestion — Missing trailing newline in both test files

Both Issue35063.cs files end with } and no trailing newline (\ No newline at end of file in the diff). While minor, this is inconsistent with the rest of the codebase and will show up as diff noise on subsequent edits.

💡 Suggestion — Extra blank line in the shared test class

TestCases.Shared.Tests/Tests/Issues/Issue35063.cs has two consecutive blank lines between the class opening brace and the constructor. Minor, but noisy.


CI Status

  • maui-prpasses (all build, pack, integration, and Helix unit test jobs)
  • maui-pr-uitestsfails on WinUI UITests Controls WebView only. This job tests Windows WebView behavior, which is entirely unrelated to this Android TabbedPage change. The failure is a pre-existing infrastructure/flakiness issue on the WinUI WebView test runner, not caused by this PR.
  • ⚠️ Build Analysis — failing as a consequence of the WinUI WebView failure above.

Devil's Advocate

Am I sure the dimension resource is correct? The m3_bottom_nav_min_height chain resolves: m3_bottom_nav_min_heightm3_comp_navigation_bar_container_height = 80dp, and the M3 BottomNavigationView theme uses that same value as android:minHeight. So the dimension resource used for the margin matches the view's declared minimum height. This is the same pattern as the non-M3 path, which already uses design_bottom_navigation_height = 56dp (the declared minHeight in the legacy theme). The approach is sound.

Could this break the non-Material3 path? No — the original design_bottom_navigation_height fallback is unchanged; the ternary only introduces a new code path for the IsMaterial3Enabled = true case.

Could the margin be wrong if a theme overrides the height? Theoretically yes — a custom theme that sets a non-standard BottomNavigationView height would produce a mismatched margin. However, this was already a risk with the legacy path (using a hardcoded resource rather than measuring the live view), so this PR doesn't introduce a new class of problem.


Blast Radius

Narrow. Only affects TabbedPage with ToolbarPlacement.Bottom on Android when RuntimeFeature.IsMaterial3Enabled is true. The non-M3 code path is unchanged. The SetContentBottomMargin method only updates the bottom margin of the content layout, which affects no other views.


Verdict: LGTM

Confidence: high

Summary: The fix is correct and targeted. It aligns the content bottom margin with the Material3 bottom navigation bar height using the same dimension-resource pattern already established in the non-Material3 path. The only notable issues are a long single-line ternary that reduces readability (⚠️) and two minor test file cosmetics (💡). The failing CI job (WinUI UITests Controls WebView) is unrelated to this change. No blocking issues.


🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35064 RuntimeFeature.IsMaterial3Enabled ? m3_bottom_nav_min_height : design_bottom_navigation_height static ternary ✅ Gate FAILED (test doesn't detect regression) TabbedPageManager.cs Minimal 1-line fix; ⚠️ long line
1 try-fix Measure BottomNavigationView actual height via View.Measure(Unspecified) at SetTabLayout call time; fallback to design_bottom_navigation_height ✅ PASS TabbedPageManager.cs (+16/-1) No M3 flag dependency; more robust to custom themes
2 try-fix Subscribe to BottomNavigationView.LayoutChange event; update margin dynamically from actual rendered height ✅ PASS TabbedPageManager.cs (+17/-1) Most robust; handles runtime changes; adds field + cleanup complexity
3 try-fix Constrain via LayoutParams.Height + MinimumHeight ❌ FAIL TabbedPageManager.cs Compile errors — MinimumHeight is read-only
4 try-fix Query MinimumHeight / theme attribute via TypedArray/Android.Resource.Attribute.MinHeight ❌ FAIL TabbedPageManager.cs 13.47% screenshot diff + compile error on theme attr binding

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 No All viable approaches exhausted: static resource, runtime measure, reactive listener, view properties, theme resolution

Exhausted: Yes
Selected Fix: PR's fix — with the readability refactor suggested in code review (extract dimId variable from the long ternary line)

Rationale:

  • PR fix and Attempt 1 both solve the bug; PR's fix is simpler (1 line vs helper method)
  • PR's fix follows the existing codebase pattern (RuntimeFeature.IsMaterial3Enabled ternary already used in ImageButtonHandler.Android.cs, CheckBoxExtensions.cs, etc.)
  • Attempt 1 (runtime measure) is slightly more robust but the PR's known-constant approach is sufficient given m3_bottom_nav_min_height is a stable Material3 design token
  • Attempt 2 (LayoutChange listener) is over-engineering for a one-time setup scenario
  • The only actionable improvement to the PR is splitting line 271 per the code review ⚠️ warning

📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Issue #35063: Android M3 BottomNavigationView height mismatch
Code Review LGTM (high) 0 errors, 1 warning, 2 suggestions
Gate ❌ FAILED android — tests did NOT detect regression when fix was removed
Try-Fix ✅ COMPLETE 4 attempts (2 passing, 2 failing); PR's fix selected
Report ✅ COMPLETE

Code Review Impact on Try-Fix

The code review ⚠️ warning on line 271 (long ternary, duplicated GetDimensionPixelSize call) prompted Attempt 1 to explore whether the whole dimension-resource selection could be avoided by measuring the view at runtime. Attempt 1 (PASS) and Attempt 2 (PASS) both confirmed that the PR's approach is one of three valid solutions. No code review ❌ Errors were found, so no model had to address correctness concerns.

Summary

The fix itself is correct: using m3_bottom_nav_min_height (80dp) instead of design_bottom_navigation_height (56dp) when Material3 is enabled aligns the content bottom margin with the actual BottomNavigationView height. CI also confirms this — the Android UITests Material3 Controls Material3 (API 36) job passed with the fix present. However, the gate failed because the test (WaitForElement + VerifyScreenshot) does not properly detect the regression: Appium can locate elements that are visually covered by the tab bar, and VerifyScreenshot() will pass without the fix if the snapshot baseline captures the broken state. The test needs bounds-level verification to be a reliable regression guard.

Root Cause

SetTabLayout() in TabbedPageManager.cs (line 271) hardcoded design_bottom_navigation_height (56dp) as the content bottom margin. Material3's BottomNavigationView uses a taller container (m3_comp_navigation_bar_container_height = 80dp), so the content area extended 24dp under the tab bar.

Fix Quality

The PR's fix is technically correct and minimal. It follows the established RuntimeFeature.IsMaterial3Enabled ternary pattern already used in ImageButtonHandler.Android.cs, CheckBoxExtensions.cs, and other files. An alternative (Attempt 1: runtime measure via View.Measure()) is slightly more robust (no hardcoded M3 flag dependency, handles custom themes), but adds a helper method for what is fundamentally a known constant.

Changes needed before merge:

  1. Test reliability (gate failure root cause): WaitForElement("Label35063_1") succeeds even when the element is visually obscured. The test should also verify the element's GetRect() Y-position + Height is above the BottomNavigationView's top edge, not just that it exists. Example:

    var labelRect = App.WaitForElement("Label35063_1").GetRect();
    var tabBarRect = App.WaitForElement("BottomTabBar35063").GetRect(); // or use content bounds
    Assert.That(labelRect.Y + labelRect.Height, Is.LessThanOrEqualTo(tabBarRect.Y),
        "Label content should not be obscured by the bottom tab bar");

    Or at minimum, add AutomationId to the BottomNavigationView in the HostApp page to enable position comparison.

  2. Code readability (⚠️ warning): Line 271 should be split to extract the dimension resource ID:

    var dimId = RuntimeFeature.IsMaterial3Enabled
        ? Resource.Dimension.m3_bottom_nav_min_height
        : Resource.Dimension.design_bottom_navigation_height;
    SetContentBottomMargin(_context.Context.Resources.GetDimensionPixelSize(dimId));
  3. Missing trailing newlines: Both Issue35063.cs files should end with a newline character.

Selected Fix: PR's fix — correct approach, needs the readability refactor and test improvement above.


🧪 UI Tests — Category Detection & Results

Build #1391777 | ✅ passed | 319/319 passed (100%)

🎯 Detected categories: Material3 — ran 1 of 143 matrix cells (skipped 142)

Results by Platform

Platform Passed Total
✅ Material3 Android (API 36) 319 319

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Apr 22, 2026
@kubaflo kubaflo changed the base branch from main to inflight/current April 23, 2026 10:28
@kubaflo kubaflo merged commit ea219bd into dotnet:inflight/current Apr 23, 2026
151 of 154 checks passed
@github-actions github-actions Bot modified the milestones: .NET 10 SR6, .NET 10 SR7 Apr 23, 2026
PureWeen pushed a commit that referenced this pull request Apr 23, 2026
…w overflowing in Tabbed page (#35074)

Backport of #35064 to release/10.0.1xx-sr6

/cc @sheiksyedm @NirmalKumarYuvaraj

### Output

| Before | After |
|--|--|
| <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1710f271-7135-4019-94da-40df48df4a6f"
/> | <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1c4b039f-5c4d-45d9-9782-7233aeea43f2"
/> |

---------

Co-authored-by: NirmalKumarYuvaraj <97871636+NirmalKumarYuvaraj@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Apr 28, 2026
… page (#35064)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->
This pull request addresses an issue where, on Android with Material3
enabled, TabbedPage bottom tabs were overflowing the content area. The
changes ensure the correct bottom margin is applied for Material3 and
add both a sample case and a UI test to verify the fix.

**Bug fix:**

* Updated `SetTabLayout()` in `TabbedPageManager.cs` to apply the
correct bottom margin depending on whether Material3 is enabled, using
`m3_bottom_nav_min_height` for Material3 and
`design_bottom_navigation_height` otherwise.

**Testing:**

* Added a new sample page `Issue35063` in `TestCases.HostApp` to
reproduce the TabbedPage bottom tab overflow issue on Android.
* Added a corresponding UI test in `TestCases.Shared.Tests` to verify
that the bottom tabs do not overflow the content when Material3 is
enabled.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #35063

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Output

| Before | After |
|--|--|
| <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1710f271-7135-4019-94da-40df48df4a6f"
/> | <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1c4b039f-5c4d-45d9-9782-7233aeea43f2"
/> |
PureWeen pushed a commit that referenced this pull request Apr 29, 2026
… page (#35064)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->
This pull request addresses an issue where, on Android with Material3
enabled, TabbedPage bottom tabs were overflowing the content area. The
changes ensure the correct bottom margin is applied for Material3 and
add both a sample case and a UI test to verify the fix.

**Bug fix:**

* Updated `SetTabLayout()` in `TabbedPageManager.cs` to apply the
correct bottom margin depending on whether Material3 is enabled, using
`m3_bottom_nav_min_height` for Material3 and
`design_bottom_navigation_height` otherwise.

**Testing:**

* Added a new sample page `Issue35063` in `TestCases.HostApp` to
reproduce the TabbedPage bottom tab overflow issue on Android.
* Added a corresponding UI test in `TestCases.Shared.Tests` to verify
that the bottom tabs do not overflow the content when Material3 is
enabled.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #35063

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Output

| Before | After |
|--|--|
| <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1710f271-7135-4019-94da-40df48df4a6f"
/> | <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1c4b039f-5c4d-45d9-9782-7233aeea43f2"
/> |
github-actions Bot pushed a commit that referenced this pull request May 6, 2026
… page (#35064)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->
This pull request addresses an issue where, on Android with Material3
enabled, TabbedPage bottom tabs were overflowing the content area. The
changes ensure the correct bottom margin is applied for Material3 and
add both a sample case and a UI test to verify the fix.

**Bug fix:**

* Updated `SetTabLayout()` in `TabbedPageManager.cs` to apply the
correct bottom margin depending on whether Material3 is enabled, using
`m3_bottom_nav_min_height` for Material3 and
`design_bottom_navigation_height` otherwise.

**Testing:**

* Added a new sample page `Issue35063` in `TestCases.HostApp` to
reproduce the TabbedPage bottom tab overflow issue on Android.
* Added a corresponding UI test in `TestCases.Shared.Tests` to verify
that the bottom tabs do not overflow the content when Material3 is
enabled.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #35063

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Output

| Before | After |
|--|--|
| <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1710f271-7135-4019-94da-40df48df4a6f"
/> | <img width="300" height="600" alt="image"
src="https://github.com/user-attachments/assets/1c4b039f-5c4d-45d9-9782-7233aeea43f2"
/> |
@github-actions github-actions Bot locked and limited conversation to collaborators May 24, 2026
@PureWeen PureWeen modified the milestones: .NET 10 SR7, .NET 10 SR8 Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-tabbedpage TabbedPage community ✨ Community Contribution material3 partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Material3 - TabbedPage bottom tabs overflowing the contents

6 participants