updated maui
This commit is contained in:
Родитель
1faec4ae72
Коммит
15fc08e6dc
|
@ -1 +1 @@
|
|||
Subproject commit a8dad6dd76bc7d3eff58e305e11d84be32c1c60e
|
||||
Subproject commit ed2fe8a94ee276fe58735515cd66cf3e817414f1
|
|
@ -115,17 +115,17 @@
|
|||
<Version>5.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
|
||||
<Version>2.3.1</Version>
|
||||
<Version>2.3.1.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Google.Android.Material">
|
||||
<Version>1.3.0.1</Version>
|
||||
<Version>1.4.0.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4">
|
||||
<Version>1.0.0.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Maui.Graphics" Version="6.0.100-preview.3.34" />
|
||||
<PackageReference Include="Xamarin.FFImageLoading" Version="2.4.11.982" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.5" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.8" />
|
||||
<PackageReference Include="Topten.RichTextKit">
|
||||
<Version>0.4.138</Version>
|
||||
</PackageReference>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Maui;
|
||||
|
||||
namespace Comet
|
||||
|
@ -28,6 +29,11 @@ namespace Comet
|
|||
|
||||
public new string Title => this.Content.GetTitle();
|
||||
|
||||
HashSet<IWindowOverlay> _overlays = new HashSet<IWindowOverlay>();
|
||||
|
||||
IVisualDiagnosticsOverlay IWindow.VisualDiagnosticsOverlay { get; }
|
||||
|
||||
IReadOnlyCollection<IWindowOverlay> IWindow.Overlays => _overlays;
|
||||
|
||||
void IWindow.Created()
|
||||
{
|
||||
|
@ -58,5 +64,35 @@ namespace Comet
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
bool IWindow.AddOverlay(IWindowOverlay overlay)
|
||||
{
|
||||
if (overlay is IVisualDiagnosticsOverlay)
|
||||
return false;
|
||||
|
||||
// Add the overlay. If it's added,
|
||||
// Initalize the native layer if it wasn't already,
|
||||
// and call invalidate so it will be drawn.
|
||||
var result = _overlays.Add(overlay);
|
||||
if (result)
|
||||
{
|
||||
overlay.Initialize();
|
||||
overlay.Invalidate();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
bool IWindow.RemoveOverlay(IWindowOverlay overlay)
|
||||
{
|
||||
if (overlay is IVisualDiagnosticsOverlay)
|
||||
return false;
|
||||
|
||||
var result = _overlays.Remove(overlay);
|
||||
if (result)
|
||||
overlay.Deinitialize();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче