diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml.cs index bf066c9cc951..af4b8a49e846 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea attached property for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 0)] @@ -7,6 +11,12 @@ public Issue28986() { InitializeComponent(); UpdateCurrentSettingsLabel(); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnGridSetNoneClicked(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml.cs index f3586378ccaf..cf523e096fd8 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea Border for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 1)] @@ -13,6 +17,12 @@ public Issue28986_Border() BottomPicker.SelectedIndex = 3; // All UpdateSafeAreaSettings(); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnEdgePickerChanged(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml.cs index f7c7ada8bdfd..18e3dc51d5e1 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea ContentPage for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 2)] @@ -7,6 +11,12 @@ public Issue28986_ContentPage() { InitializeComponent(); UpdateCurrentSettingsLabel(); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnGridSetNoneClicked(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml.cs index 6eeed5888845..4d8f3d81bf47 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea ContentView for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 3)] @@ -13,6 +17,12 @@ public Issue28986_ContentView() BottomPicker.SelectedIndex = 3; // All UpdateSafeAreaSettings(); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnEdgePickerChanged(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_FlyoutPage.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_FlyoutPage.cs index edc5f7e155f0..ac39c1a29769 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_FlyoutPage.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_FlyoutPage.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea Flyout Page for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 8)] @@ -20,5 +24,11 @@ public Issue28986_FlyoutPage() : base() } } }; + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } } \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_NavigationPage.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_NavigationPage.cs index 2098bacfe588..84598adb0a16 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_NavigationPage.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_NavigationPage.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea Navigation Page for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 7)] @@ -6,5 +10,11 @@ public partial class Issue28986_NavigationPage : NavigationPage public Issue28986_NavigationPage() : base(new Issue28986_ContentPage()) { BarBackground = Colors.Blue; + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } } \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_SafeAreaBorderOrientation.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_SafeAreaBorderOrientation.xaml.cs index c594d656e000..be0dbb491662 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_SafeAreaBorderOrientation.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_SafeAreaBorderOrientation.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 5)] @@ -18,6 +22,12 @@ public Issue28986_SafeAreaBorderOrientation() // Update dimensions when the page appears this.Appearing += OnPageAppearing; + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnPageAppearing(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml.cs index 42efd57f46b6..122bd03fbf59 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea ScrollView for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 4)] @@ -7,6 +11,12 @@ public Issue28986_ScrollView() { InitializeComponent(); UpdateCurrentSettingsLabel(); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } private void OnScrollViewSetNoneClicked(object sender, EventArgs e) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs index 33500e051962..58687816c105 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs @@ -1,3 +1,7 @@ +#if ANDROID +using Android.Views; +#endif + namespace Maui.Controls.Sample.Issues; [Issue(IssueTracker.Github, 28986, "Test SafeArea Shell Page for per-edge safe area control", PlatformAffected.Android | PlatformAffected.iOS, issueTestNumber: 6)] @@ -33,5 +37,11 @@ public Issue28986_Shell() : base() } } }); + +#if ANDROID + // Set SoftInput.AdjustNothing - we have full control over insets (iOS-like behavior) + var window = Microsoft.Maui.ApplicationModel.Platform.CurrentActivity?.Window; + window?.SetSoftInputMode(SoftInput.AdjustNothing | SoftInput.StateUnspecified); +#endif } } \ No newline at end of file