Closed SuperWZ closed 3 years ago
just signed the CLA
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Not sure what this is fixing, can you give an explanation?
Hello, I encountered the same bug, so I can add details, in hope that this gets fixed. The ValueAnimators value is already being set to as a fraction
mValueAnimator = ValueAnimator.ofFloat(0f, 1f + (mShimmer!!.repeatDelay / mShimmer!!.animationDuration).toFloat())
...
mValueAnimator.setDuration(mShimmer.animationDuration + mShimmer.repeatDelay);
So currently, because mValueAnimator.getAnimatedFraction()
is being used, the repeatDelay
gets compeltely ignored.
In short if mValueAnimator.getAnimatedValue()
is used instead, we get the correct repeatDelay
ex. if animation duration is 500ms and delay is 2000ms, then the animator duration is 2500, and it returns 1f at 500ms point and for the rest 1500ms it returns > 1.0f ("offscreen" values )
Thanks for the explanation and fix!
@xiphirx merged this pull request in facebook/shimmer-android@fc81e7683009aa54ba9d82584dac32390b93924d.
Hi @SuperWZ!
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.
In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!