alexjlockwood / adp-path-morph-play-to-pause

Play-to-pause path morphing example
MIT License
348 stars 40 forks source link

Offcentered #3

Closed PaulWoitaschek closed 8 years ago

PaulWoitaschek commented 9 years ago

When setting the drawable as an icon on an imagedrawable, its totally offcentered (by maybe a centimeter). How to fix that?

And what I dont get is how to reverse the animation? It alwys just goes to from play to pause but as it hits pause it just flashes back to play.

garretyoder commented 8 years ago

How are you calling the transition from play/pause? If you want it offcentered, wrap it inside another view or layout and use gravity to move it.

PaulWoitaschek commented 8 years ago

I don' use this directly any more. I was using it in a FAB. If you set any else drawable, it is always centered. My fix was to translate the whole canvas by (bounds.left, bounds.top).