Browse Source
Merge pull request #10994 from AvaloniaUI/android-safe-area-fix
Android - Fix bottom inset value when displaying edge to edge
pull/11005/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs
|
|
|
@ -81,7 +81,7 @@ namespace Avalonia.Android.Platform |
|
|
|
var renderScaling = _topLevel.RenderScaling; |
|
|
|
|
|
|
|
var inset = insets.GetInsets( |
|
|
|
(DisplayEdgeToEdge ? |
|
|
|
(_displayEdgeToEdge ? |
|
|
|
WindowInsetsCompat.Type.StatusBars() | WindowInsetsCompat.Type.NavigationBars() | |
|
|
|
WindowInsetsCompat.Type.DisplayCutout() : |
|
|
|
0) | WindowInsetsCompat.Type.Ime()); |
|
|
|
@ -91,8 +91,8 @@ namespace Avalonia.Android.Platform |
|
|
|
return new Thickness(inset.Left / renderScaling, |
|
|
|
inset.Top / renderScaling, |
|
|
|
inset.Right / renderScaling, |
|
|
|
(imeInset.Bottom > 0 && ((_usesLegacyLayouts && !DisplayEdgeToEdge) || !_usesLegacyLayouts) ? |
|
|
|
imeInset.Bottom - navBarInset.Bottom : |
|
|
|
(imeInset.Bottom > 0 && ((_usesLegacyLayouts && !_displayEdgeToEdge) || !_usesLegacyLayouts) ? |
|
|
|
imeInset.Bottom - (_displayEdgeToEdge ? 0 : navBarInset.Bottom) : |
|
|
|
inset.Bottom) / renderScaling); |
|
|
|
} |
|
|
|
|
|
|
|
|