Skip to content

Commit

Permalink
Animations (#1436)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Jun 24, 2021
1 parent c3083b9 commit 3c85507
Show file tree
Hide file tree
Showing 53 changed files with 1,272 additions and 610 deletions.
120 changes: 0 additions & 120 deletions src/Compatibility/Core/src/Android/AndroidTicker.cs

This file was deleted.

6 changes: 0 additions & 6 deletions src/Compatibility/Core/src/Android/Forms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ static void SetupInit(
Device.SetFlags(s_flags);

Profile.FramePartition("AndroidTicker");
Ticker.SetDefault(null);

Profile.FramePartition("RegisterAll");

Expand Down Expand Up @@ -670,11 +669,6 @@ public void BeginInvokeOnMainThread(Action action)
s_handler.Post(action);
}

public Ticker CreateTicker()
{
return new AndroidTicker();
}

public Assembly[] GetAssemblies()
{
return AppDomain.CurrentDomain.GetAssemblies();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Android.Content;
using Microsoft.Maui.Animations;
using Microsoft.Maui.Controls.Internals;

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

public void CheckAnimationEnabledStatus()
{
((AndroidTicker)Ticker.Default).CheckAnimationEnabledStatus();
NativeTicker.CheckPowerSaveModeStatus();
}
}
}
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Compatibility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<Compile Include="RendererToHandlerShim.cs" />
</ItemGroup>

<ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public void BeginInvokeOnMainThread(Action action)
//await TryAllDispatchers(action);
}

public Ticker CreateTicker()
{
return new WindowsTicker();
}

public virtual Assembly[] GetAssemblies()
{

Expand Down
45 changes: 0 additions & 45 deletions src/Compatibility/Core/src/WinUI/WindowsTicker.cs

This file was deleted.

67 changes: 0 additions & 67 deletions src/Compatibility/Core/src/iOS/CADisplayLinkTicker.cs

This file was deleted.

6 changes: 1 addition & 5 deletions src/Compatibility/Core/src/iOS/Forms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Animations;

#if __MOBILE__
using UIKit;
Expand Down Expand Up @@ -330,11 +331,6 @@ public void BeginInvokeOnMainThread(Action action)
NSRunLoop.Main.BeginInvokeOnMainThread(action.Invoke);
}

public Ticker CreateTicker()
{
return new CADisplayLinkTicker();
}

public Assembly[] GetAssemblies()
{
return AppDomain.CurrentDomain.GetAssemblies();
Expand Down
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/iOS/VisualElementTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void update()

#if __MOBILE__
if (thread)
CADisplayLinkTicker.Default.Invoke(update);
view.Dispatcher.Dispatch(update);
else
update();
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility.csproj">
<Project>{8e86f0da-ed1c-409e-a7a9-df3e58498620}</Project>
<Project>{9FAA9654-80E6-4664-9702-47998A04E8FE}</Project>
<Name>Compatibility</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Essentials\src\Essentials.csproj">
Expand All @@ -99,7 +99,7 @@
<Name>Core</Name>
</ProjectReference>
<ProjectReference Include="..\Controls.Sample\Controls.Sample.csproj">
<Project>{90b727dd-4c7b-4462-950f-61842a87de8a}</Project>
<Project>{8e86f0da-ed1c-409e-a7a9-df3e58498620}</Project>
<Name>Controls.Sample</Name>
</ProjectReference>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Controls/src/Core/AnimatableKey.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Microsoft.Maui.Animations;

namespace Microsoft.Maui.Controls
{
Expand Down
Loading

0 comments on commit 3c85507

Please sign in to comment.