SLVZ.Android.EdgeToEdge
1.1.5
dotnet add package SLVZ.Android.EdgeToEdge --version 1.1.5
NuGet\Install-Package SLVZ.Android.EdgeToEdge -Version 1.1.5
<PackageReference Include="SLVZ.Android.EdgeToEdge" Version="1.1.5" />
<PackageVersion Include="SLVZ.Android.EdgeToEdge" Version="1.1.5" />
<PackageReference Include="SLVZ.Android.EdgeToEdge" />
paket add SLVZ.Android.EdgeToEdge --version 1.1.5
#r "nuget: SLVZ.Android.EdgeToEdge, 1.1.5"
#:package SLVZ.Android.EdgeToEdge@1.1.5
#addin nuget:?package=SLVZ.Android.EdgeToEdge&version=1.1.5
#tool nuget:?package=SLVZ.Android.EdgeToEdge&version=1.1.5
Edge-to-Edge Handler
A lightweight Android-only helper library for handling Edge-to-Edge layouts in .NET MAUI applications.
This library must be initialized once, to correctly calculate system insets and apply Edge-to-Edge behavior.
⚠️ Requirements & Constraints
- Android only
- .NET MAUI
- Must be executed only once
- Requires access to both
MainActivityandMainPage
This library intentionally avoids automatic lifecycle hooks to keep behavior predictable and explicit.
1. MainActivity Setup
You can provide the Activity to the handler in two ways
✅ Direct Injection
Set the activity directly in MainActivity.cs inside OnCreate:
protected override void OnCreate(Bundle savedInstanceState)
{
WindowCompat.SetDecorFitsSystemWindows(Window, false);
base.OnCreate(savedInstanceState);
SLVZ.Android.EdgeToEdge.Handler.SetActivity(this);
}
2. MainPage Setup
You need to provide the ContentPage in MainPage
✅ Direct Injection
Set the page directly inside the constructor:
public MainPage()
{
InitializeComponent();
SLVZ.Android.EdgeToEdge.Handler.SetPage(this);
}
Done 😍
3. Initialize the Handler
After you provid ContentPage and Activity it will automaticly initialize and fix edge-to-edge screen
Design Philosophy
This library prioritizes:
- Predictability over automation
- Explicit control over hidden behavior
- Stability across different Android versions
Automatic initialization was intentionally avoided to prevent fragile implementations.
License
MIT
👨💻 Author: SLVZ
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. |
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.5 | 133 | 1/5/2026 |