-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[camera] Fix immediate camera animation on API level 23 or below - MAPSAND-614 #1842
Conversation
481fdef
to
1135b39
Compare
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Outdated
Show resolved
Hide resolved
6558584
to
4ae85bb
Compare
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Show resolved
Hide resolved
4ae85bb
to
e6a4060
Compare
...in-animation/src/test/java/com/mapbox/maps/plugin/animation/CameraAnimationsListenersTest.kt
Show resolved
Hide resolved
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Show resolved
Hide resolved
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Outdated
Show resolved
Hide resolved
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Show resolved
Hide resolved
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/animator/CameraAnimator.kt
Outdated
Show resolved
Hide resolved
@pengdev can you try running tests locally on API = 23 device? we ignore them now as per mapbox-maps-android/sdk/src/androidTest/java/com/mapbox/maps/CameraAnimationsPluginTest.kt Line 1027 in 651553f
|
@kiryldz I tried it, still Given the scope of this PR only helps immediate animation with both duration and startDelay is set to 0. Probably we should add separate tests this use case. I will try to improve the tests as well. |
app/src/androidTest/java/com/mapbox/maps/testapp/viewport/ViewportPluginTest.kt
Outdated
Show resolved
Hide resolved
9835ab1
to
c6f7fe9
Compare
app/src/androidTest/java/com/mapbox/maps/testapp/viewport/ViewportPluginTest.kt
Show resolved
Hide resolved
app/src/androidTest/java/com/mapbox/maps/testapp/viewport/ViewportPluginTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/mapbox/maps/testapp/viewport/ViewportPluginTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/mapbox/maps/testapp/viewport/ViewportPluginTest.kt
Show resolved
Hide resolved
de277a8
to
5ceaf31
Compare
199d60d
to
05b59cc
Compare
05b59cc
to
a7f04ba
Compare
a7f04ba
to
8ecbfaa
Compare
Summary of changes
This PR bypasses the immediate camera animation(where duration and start delay of the animation is 0) on the animator, and emit a single animator update instead of trying to start the ValueAnimator directly.
More context on the issue with animators on API 23 or below:
User impact (optional)
This change particularly affects the camera animation and viewport plugin on API level 23 or below.
For example viewport plugin's
FollowPuckViewportState
behaviour will be fixed as shown below:before.webm
after.webm
Pull request checklist:
@JvmOverloads
,@file:JvmName
, etc).make update-api
to update generated api files, if there's public API changes, otherwise theverify-api-*
CI steps might fail.check changelog
CI step will fail.v10.[version]
release branch fix / enhancement, merge it tomain
firstly and then port tov10.[version]
release branch.Fixes: < Link to related issues that will be fixed by this pull request, if they exist >
PRs must be submitted under the terms of our Contributor License Agreement CLA.