flavioarfaria / KenBurnsView

Android ImageViews animated by Ken Burns Effect
Apache License 2.0
2.73k stars 435 forks source link

Don't set mDrawableRect before image loads and dimensions are known #23

Closed EricSiegNW closed 9 years ago

EricSiegNW commented 9 years ago

In some cases, for example when using Picasso to load the image, this is getting checked before the image is loaded and thus before the drawable dimensions are known. The experience that results is that it starts SUPER zoomed in (since the mDrawableRect is set to 0, 0, -1, -1) and gradually zooms all the way out. By treating drawables with 0 height/width as not being ready, we can avoid that issue and the experience is a more familiar one.

flavioarfaria commented 9 years ago

Thank you very much @Vilgan!