Skip to content

Commit 6a4f5a9

Browse files
authored
Android animations respect power saving (#1856)
* Android animations respect power saving. * Fix include file link. * Edit.
1 parent 5673998 commit 6a4f5a9

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

docs/user-interface/animation/basic.md

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ The animation extension methods in the <xref:Microsoft.Maui.Controls.ViewExtensi
3131

3232
If there's a requirement to let an animation complete in the background, then the `await` operator can be omitted. In this scenario, the animation extension methods will quickly return after initiating the animation, with the animation occurring in the background. This operation can be taken advantage of when creating composite animations. For more information, see [Composite animations](#composite-animations).
3333

34+
::: moniker range=">=net-maui-8.0"
35+
36+
[!INCLUDE [Android animation system settings](../includes/animation-android.md)]
37+
38+
::: moniker-end
39+
3440
## Single animations
3541

3642
Each extension method in the <xref:Microsoft.Maui.Controls.ViewExtensions> class implements a single animation operation that progressively changes a property from one value to another value over a period of time.

docs/user-interface/animation/custom.md

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Running an animation created with the <xref:Microsoft.Maui.Controls.Animation> c
1515
> [!NOTE]
1616
> The <xref:Microsoft.Maui.Controls.Animation> class has an <xref:Microsoft.Maui.Controls.Animation.IsEnabled> property that can be examined to determine if animations have been disabled by the operating system, such as when power saving mode is activated.
1717
18+
::: moniker range=">=net-maui-8.0"
19+
20+
[!INCLUDE [Android animation system settings](../includes/animation-android.md)]
21+
22+
::: moniker-end
23+
1824
## Create an animation
1925

2026
When creating an <xref:Microsoft.Maui.Controls.Animation> object, typically, a minimum of three parameters are required, as demonstrated in the following code example:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
ms.topic: include
3+
ms.date: 11/07/2023
4+
---
5+
6+
On Android, animations respect the system animation settings:
7+
8+
- If the system's animations are disabled (either by accessibility features or developer features), new animations will jump immediately to their finished state.
9+
- If the device's power saving mode is activated while animations are in progress, the animations will immediately jump to their finished state.
10+
- If the device's animation durations is set to zero (disabled) while animations are in progress and the API version is 33 or greater, the animations will immediately jump to their finished state.

docs/whats-new/dotnet-8.md

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ The following behavior has changed from the previous release:
9898
- It's not required to specify a value for the `$(ApplicationIdGuid)` build property in your app's project file. This is because .NET MAUI Windows apps no longer require a GUID as an app ID, and instead use the value of the `$(ApplicationId)` build property as the app ID. Therefore, the same reverse domain format app ID is now used across all platforms, such as com.mycompany.myapp.
9999
- .NET MAUI Mac Catalyst apps are no longer limited to 50 menu items on the menu bar.
100100
- The `PlatformImage.FromStream` method, in the `Microsoft.Maui.Graphics` namespace, can now be used to load images on Windows instead of having to use the `W2DImageLoadingService` class.
101+
- On Android, animations respect the system animation settings. For more information, see [Basic animation](~/user-interface/animation/basic.md).
101102

102103
## Performance
103104

0 commit comments

Comments
 (0)