Skip to content

Commit 3c85507

Browse files
ClanceyJonathan Dickpictos
authored
Animations (#1436)
* Initial Animations Pass * Added more lerps. Cleaned up the old ones * Cleaned up animation initialization * Fixed so many tests * fixed final animation tests * Fixed version mangling by VSMac * Updated the Windows Native Ticker * Fixed null crap * Update NativeTicker.cs * fix tests * Update src/Core/src/Platform/Android/NativeTicker.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Fixed nullability * Code cleanup Co-authored-by: Jonathan Dick <jond@hey.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
1 parent c3083b9 commit 3c85507

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1272
-610
lines changed

src/Compatibility/Core/src/Android/AndroidTicker.cs

Lines changed: 0 additions & 120 deletions
This file was deleted.

src/Compatibility/Core/src/Android/Forms.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ static void SetupInit(
361361
Device.SetFlags(s_flags);
362362

363363
Profile.FramePartition("AndroidTicker");
364-
Ticker.SetDefault(null);
365364

366365
Profile.FramePartition("RegisterAll");
367366

@@ -670,11 +669,6 @@ public void BeginInvokeOnMainThread(Action action)
670669
s_handler.Post(action);
671670
}
672671

673-
public Ticker CreateTicker()
674-
{
675-
return new AndroidTicker();
676-
}
677-
678672
public Assembly[] GetAssemblies()
679673
{
680674
return AppDomain.CurrentDomain.GetAssemblies();

src/Compatibility/Core/src/Android/PowerSaveModeBroadcastReceiver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Android.Content;
2+
using Microsoft.Maui.Animations;
23
using Microsoft.Maui.Controls.Internals;
34

45
namespace Microsoft.Maui.Controls.Compatibility.Platform.Android
@@ -13,7 +14,7 @@ public override void OnReceive(Context context, Intent intent)
1314

1415
public void CheckAnimationEnabledStatus()
1516
{
16-
((AndroidTicker)Ticker.Default).CheckAnimationEnabledStatus();
17+
NativeTicker.CheckPowerSaveModeStatus();
1718
}
1819
}
1920
}

src/Compatibility/Core/src/Compatibility.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<Compile Include="RendererToHandlerShim.cs" />
6969
</ItemGroup>
7070

71-
<ItemGroup>
71+
<ItemGroup>
7272
<PackageReference Include="Microsoft.Extensions.Configuration" />
7373
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
7474
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />

src/Compatibility/Core/src/WinUI/WindowsBasePlatformServices.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ public void BeginInvokeOnMainThread(Action action)
6060
//await TryAllDispatchers(action);
6161
}
6262

63-
public Ticker CreateTicker()
64-
{
65-
return new WindowsTicker();
66-
}
67-
6863
public virtual Assembly[] GetAssemblies()
6964
{
7065

src/Compatibility/Core/src/WinUI/WindowsTicker.cs

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/Compatibility/Core/src/iOS/CADisplayLinkTicker.cs

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/Compatibility/Core/src/iOS/Forms.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Maui.Controls.PlatformConfiguration;
1616
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
1717
using Microsoft.Maui.Graphics;
18+
using Microsoft.Maui.Animations;
1819

1920
#if __MOBILE__
2021
using UIKit;
@@ -330,11 +331,6 @@ public void BeginInvokeOnMainThread(Action action)
330331
NSRunLoop.Main.BeginInvokeOnMainThread(action.Invoke);
331332
}
332333

333-
public Ticker CreateTicker()
334-
{
335-
return new CADisplayLinkTicker();
336-
}
337-
338334
public Assembly[] GetAssemblies()
339335
{
340336
return AppDomain.CurrentDomain.GetAssemblies();

src/Compatibility/Core/src/iOS/VisualElementTracker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void update()
343343

344344
#if __MOBILE__
345345
if (thread)
346-
CADisplayLinkTicker.Default.Invoke(update);
346+
view.Dispatcher.Dispatch(update);
347347
else
348348
update();
349349
#else

src/Controls/samples/Controls.Sample.Droid/Controls.Sample.Droid.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
</ItemGroup>
8484
<ItemGroup>
8585
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility.csproj">
86-
<Project>{8e86f0da-ed1c-409e-a7a9-df3e58498620}</Project>
86+
<Project>{9FAA9654-80E6-4664-9702-47998A04E8FE}</Project>
8787
<Name>Compatibility</Name>
8888
</ProjectReference>
8989
<ProjectReference Include="..\..\..\Essentials\src\Essentials.csproj">
@@ -99,7 +99,7 @@
9999
<Name>Core</Name>
100100
</ProjectReference>
101101
<ProjectReference Include="..\Controls.Sample\Controls.Sample.csproj">
102-
<Project>{90b727dd-4c7b-4462-950f-61842a87de8a}</Project>
102+
<Project>{8e86f0da-ed1c-409e-a7a9-df3e58498620}</Project>
103103
<Name>Controls.Sample</Name>
104104
</ProjectReference>
105105
</ItemGroup>

0 commit comments

Comments
 (0)