private void loadImageAnimateCode() { ViewPropertyAnimation.Animator animationObject = new ViewPropertyAnimation.Animator() { @Override public void animate(View view) { view.setAlpha(0f); ObjectAnimator fadeAnim = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f); fadeAnim.setDuration(2500); fadeAnim.start(); } }; Glide .with(context) .load(eatFoodyImages[1]) .animate(animationObject) .into(imageView2); }
public GlidePlus animate(ViewPropertyAnimation.Animator animator) { mRequestBuilder.animate(animator); return this; }