Android - fix first time shared transition animation dont work using picasso (thanks to http://www.androiddesignpatterns.com/2015/03/activity-postponed-shared-element-transitions-part3b.html)
class MyActivity {
fun onCreate(){
supportPostponeEnterTransition()
}
fun setImage(imageUrl: String) {
Picasso.with(applicationContext)
.load(imageUrl)
.fit()
.noFade()
.noPlaceholder()
.into(imageView, object : Callback {
override fun onSuccess() = supportStartPostponedEnterTransition()
override fun onError() = supportStartPostponedEnterTransition()
})
}
}