Julien Lebosquain
4 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
15 additions and
9 deletions
-
samples/ControlCatalog.Android/ControlCatalog.Android.csproj
-
src/Android/Avalonia.Android/Avalonia.Android.csproj
-
src/Android/Avalonia.Android/AvaloniaAccessHelper.cs
-
src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs
|
|
|
@ -25,7 +25,7 @@ |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.17" /> |
|
|
|
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ |
|
|
|
<ItemGroup> |
|
|
|
<ProjectReference Include="..\..\..\packages\Avalonia\Avalonia.csproj" /> |
|
|
|
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.7.1.1" /> |
|
|
|
<PackageReference Include="Xamarin.AndroidX.Window" Version="1.5.0" /> |
|
|
|
<PackageReference Include="Xamarin.AndroidX.Window" Version="1.5.1" /> |
|
|
|
</ItemGroup> |
|
|
|
<ItemGroup> |
|
|
|
<ProjectReference Include="..\..\Avalonia.Base\Avalonia.Base.csproj" /> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Android.OS; |
|
|
|
using AndroidX.Core.View.Accessibility; |
|
|
|
@ -157,7 +158,7 @@ namespace Avalonia.Android |
|
|
|
if (labeledBy is not null) |
|
|
|
{ |
|
|
|
GetOrCreateNodeInfoProvidersFromPeer(labeledBy, out int labeledById); |
|
|
|
nodeInfo.SetLabeledBy(_view, labeledById); |
|
|
|
nodeInfo.AddLabeledBy(_view, labeledById); |
|
|
|
} |
|
|
|
|
|
|
|
// UI debug metadata
|
|
|
|
@ -181,7 +182,7 @@ namespace Avalonia.Android |
|
|
|
_view.TopLevelImpl.PointToScreen(bounds.TopLeft), |
|
|
|
_view.TopLevelImpl.PointToScreen(bounds.BottomRight) |
|
|
|
); |
|
|
|
nodeInfo.SetBoundsInParent(new( |
|
|
|
nodeInfo.SetBoundsInScreen(new( |
|
|
|
screenRect.X, screenRect.Y, |
|
|
|
screenRect.Right, screenRect.Bottom |
|
|
|
)); |
|
|
|
|
|
|
|
@ -302,12 +302,17 @@ namespace Avalonia.Android.Platform |
|
|
|
_activity.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); |
|
|
|
|
|
|
|
var androidColor = global::Android.Graphics.Color.Argb(color.A, color.R, color.G, color.B); |
|
|
|
_activity.Window.SetStatusBarColor(androidColor); |
|
|
|
|
|
|
|
if (Build.VERSION.SdkInt >= BuildVersionCodes.O) |
|
|
|
// Status and navigation bar colors can't be changed at all with API level >= 35
|
|
|
|
if (!OperatingSystem.IsAndroidVersionAtLeast(35)) |
|
|
|
{ |
|
|
|
// As we can only change the navigation bar's foreground api 26 and newer, we only change the background color if running on those versions
|
|
|
|
_activity.Window.SetNavigationBarColor(androidColor); |
|
|
|
_activity.Window.SetStatusBarColor(androidColor); |
|
|
|
|
|
|
|
if (Build.VERSION.SdkInt >= BuildVersionCodes.O) |
|
|
|
{ |
|
|
|
// As we can only change the navigation bar's foreground api 26 and newer, we only change the background color if running on those versions
|
|
|
|
_activity.Window.SetNavigationBarColor(androidColor); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|