<p dir="auto">Is there a simple integrated way to handle the load animation based on a condition not at the call time but at the loading time ?</p>
<p dir="auto">Typical basic usage : <code class="notranslate">.animate(getUserVisibleHint() ? R.anim.abc_fade_in : R.anim.none)</code> with a viewpager that preload fragments.</p>
<p dir="auto">This works well when loading from cache as it's fast so 99% of the time the image is loaded in invisible fragment before displaying. But when loading from Internet it can be slow and so the image can be loaded while the fragment is visible.</p>
<p dir="auto">And of course in that case the animation does not play since the call was made when the fragment was not visible.</p>
<p dir="auto">This would also maybe allow a proper handling of animate / don't animate in more global way avoiding the empty anim to cover this, since you can't pass 0 or -1 to animate to disable or a boolean somewhere. Making the usage of the builder pattern less useful.</p>