diff --git a/src/Controls/src/Core/Compatibility/Android/Resources/layout/flyoutcontent.axml b/src/Controls/src/Core/Compatibility/Android/Resources/layout/flyoutcontent.axml index 3e29e9461551..69efe218469d 100644 --- a/src/Controls/src/Core/Compatibility/Android/Resources/layout/flyoutcontent.axml +++ b/src/Controls/src/Core/Compatibility/Android/Resources/layout/flyoutcontent.axml @@ -12,8 +12,7 @@ android:id="@+id/flyoutcontent_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@null" app:elevation="0dp" - android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /> + android:theme="@style/MauiAppBarLayout" /> diff --git a/src/Controls/src/Core/Compatibility/Android/Resources/layout/shellcontent.axml b/src/Controls/src/Core/Compatibility/Android/Resources/layout/shellcontent.axml index a5c57497ef1e..1901487a592a 100644 --- a/src/Controls/src/Core/Compatibility/Android/Resources/layout/shellcontent.axml +++ b/src/Controls/src/Core/Compatibility/Android/Resources/layout/shellcontent.axml @@ -11,7 +11,7 @@ android:id="@+id/shellcontent.appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + android:theme="@style/MauiAppBarLayout" > diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellContentFragment.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellContentFragment.cs index f0967033417c..beda4da2a66f 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellContentFragment.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellContentFragment.cs @@ -6,6 +6,7 @@ using Android.Views.Animations; using AndroidX.AppCompat.Widget; using AndroidX.CoordinatorLayout.Widget; +using AndroidX.Core.View; using AndroidX.Fragment.App; using Google.Android.Material.AppBar; using AndroidAnimation = Android.Views.Animations.Animation; @@ -142,6 +143,9 @@ public override AView OnCreateView(LayoutInflater inflater, ViewGroup container, _toolbar = (AToolbar)shellToolbar.ToPlatform(shellContentMauiContext); var appBar = _root.FindViewById(Resource.Id.shellcontent_appbar); + + ViewCompat.SetOnApplyWindowInsetsListener(appBar, new ShellSectionRenderer.WindowsListener()); + appBar.AddView(_toolbar); _viewhandler = _page.ToHandler(shellContentMauiContext); diff --git a/src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs b/src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs index 579691c45bf7..d5423beed441 100644 --- a/src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs +++ b/src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs @@ -13,6 +13,7 @@ using AAnimation = Android.Views.Animations.Animation; using AColor = Android.Graphics.Color; using AView = Android.Views.View; +using AndroidX.Core.View; namespace Microsoft.Maui.Controls.Platform { @@ -310,6 +311,8 @@ public override AView OnCreateView(LayoutInflater inflater, ViewGroup? container var rootView = _navigationRootManager?.RootView ?? throw new InvalidOperationException("Root view not initialized"); + + ViewCompat.SetOnApplyWindowInsetsListener(rootView, new WindowHandler.WindowsListener()); if (IsAnimated) { diff --git a/src/Core/src/Platform/Android/Resources/Layout/navigationlayout.axml b/src/Core/src/Platform/Android/Resources/Layout/navigationlayout.axml index 1eb995d26be4..2bac91007bfd 100644 --- a/src/Core/src/Platform/Android/Resources/Layout/navigationlayout.axml +++ b/src/Core/src/Platform/Android/Resources/Layout/navigationlayout.axml @@ -11,8 +11,7 @@ android:id="@+id/navigationlayout_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorPrimary" - android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + android:theme="@style/MauiAppBarLayout" > - - - \ No newline at end of file diff --git a/src/Core/src/Platform/Android/Resources/values/styles.xml b/src/Core/src/Platform/Android/Resources/values/styles.xml index 13c3f7277fe7..2c49a4c21f79 100644 --- a/src/Core/src/Platform/Android/Resources/values/styles.xml +++ b/src/Core/src/Platform/Android/Resources/values/styles.xml @@ -10,7 +10,7 @@ @color/colorPrimaryDark @color/colorAccent @color/colorActionMenuTextColor - @style/ThemeOverlay.AppCompat.Dark.ActionBar + @style/MauiAppBarLayout @style/Widget.Design.BottomNavigationView @style/MauiMaterialButton @style/MauiCheckBox @@ -18,6 +18,9 @@ @style/MauiAlertDialogTheme @style/MauiAlertDialogTheme +