New issue
Advanced search Search tips

Issue 829388 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

ic_check_googblue_24dp_animated.xml skips the first part of the animation

Project Member Reported by bsazonov@chromium.org, Apr 5 2018

Issue description

By default AnimatorSet uses android:ordering="together" [1], so the first <objectAnimator> tag in ic_check_googblue_24dp_animated.xml doesn't change the appearance.

Please see the attached video.

While we're at it, it probably makes sense to use trimPathEnd for the animation, as it's simpler and more readable than path morphing. As a bonus, this animation won't really depend on the exact pathData, so we can then extract the vector drawable XML in a separate  file and replace ic_check_googblue_24dp.png with this new drawable.

[1] https://cs.chromium.org/chromium/src/third_party/android_tools/sdk/sources/android-25/android/animation/AnimatorInflater.java?l=675&rcl=c22a664c39af72dd8f89200220713dcad811300a
 
CheckmarkAnimationSlow.mp4
1.6 MB View Download
Here's how it looks like with animation based on trimPathEnd (the same 10x slowdown).
TrimPathEndCheckmarkAnimationSlow.mp4
935 KB View Download
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77dddb8c64915c9c376fc93ee00c70d940b6579a

commit 77dddb8c64915c9c376fc93ee00c70d940b6579a
Author: Boris Sazonov <bsazonov@chromium.org>
Date: Thu Apr 05 17:38:01 2018

[Android] Use trimPathEnd to animate checkmark

This CL reimplements how ic_check_googblue_24dp_animated is animated by
replacing path morphing with trimPathEnd and removing no longer
necessary AnimatorSet. This fixes the issue when the first line in the
checkmark wasn't animated because both objectAnimators were trying to
animate pathData simultaneously (because default android:ordering for
AnimatorSet is "together").

Bug:  829388 
Change-Id: I05e568e8f289cb71c869c916f488a159f11f6a64
Reviewed-on: https://chromium-review.googlesource.com/998034
Reviewed-by: Becky Zhou <huayinz@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548471}
[modify] https://crrev.com/77dddb8c64915c9c376fc93ee00c70d940b6579a/chrome/android/java/res/drawable/ic_check_googblue_24dp_animated.xml

Description: Show this description
Labels: Hotlist-Polish
Status: Fixed (was: Started)

Sign in to add a comment