Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Fix incorrect start position of showcase animation #377

Merged
merged 1 commit into from
Apr 4, 2016

Conversation

robhor
Copy link
Contributor

@robhor robhor commented Mar 4, 2016

This PR fixes #372.

ShowcaseView#setShowcasePosition adjusts the given coordinates for the location of the ShowcaseView inside the window.
When ObjectAnimator calls getShowcaseY to get the starting value for the animation, the already adjusted value was returned, thus basically incorrectly applying the adjustment twice when the ObjectAnimator sets that value at the start of the animation.
In effect, setShowcaseY(getShowcaseY()) changed the value of showcaseY.

As a fix, hide the fact that the fields showcaseX and showcaseY are adjusted by returning the un-adjusted values from their getters.

ShowcaseView#setShowcasePosition adjusts the given coordinates
for the location of the ShowcaseView inside the window.
When ObjectAnimator calls getShowcaseY to get the starting value
for the animation, the already adjusted value was returned,
thus basically incorrectly applying the adjustment twice when
the ObjectAnimator sets that value at the start of the animation.

As a fix, hide the fact that the fields showcaseX and showcaseY
are adjusted by returning the un-adjusted values from their getters.
@amlcurran
Copy link
Owner

oh man, good catch! Will give this a quick smoke test to make sure everything is alright and if it is, I'll merge :)

@amlcurran
Copy link
Owner

Thanks for this!

amlcurran added a commit that referenced this pull request Apr 6, 2016
Fix #377, where changing the text wouldn't update the ShowcaseView
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animation starting point always on top
2 participants