Browse Source

fix oversight with display edge to edge detection for android 16 (#19067)

pull/19075/head
Emmanuel Hansen 1 year ago
committed by GitHub
parent
commit
36fe4145dd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs

2
src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs

@ -97,7 +97,7 @@ namespace Avalonia.Android.Platform
_topLevel = topLevel;
// Better detection for target sdk and running api level. Apps can change their target sdk and bypass dotnet's fixed target sdk level.
_isDisplayEdgeToEdgeForced = _activity.ApplicationContext?.ApplicationInfo?.TargetSdkVersion == (BuildVersionCodes)35 && Build.VERSION.SdkInt >= (BuildVersionCodes)35;
_isDisplayEdgeToEdgeForced = _activity.ApplicationContext?.ApplicationInfo?.TargetSdkVersion >= (BuildVersionCodes)35 && Build.VERSION.SdkInt >= (BuildVersionCodes)35;
ViewCompat.SetOnApplyWindowInsetsListener(Window.DecorView, this);

Loading…
Cancel
Save