Adapt's the icon of the dialog's header.

@param animation
The animation, which should be used to change the icon, as an instance of the class
{@link DrawableAnimation} or null, if no animation should be used
347487
private void adaptHeaderIcon(@Nullable final DrawableAnimation animation) {
        if (headerIconImageView != null) {
            ImageViewCompat.setImageTintList(headerIconImageView, headerIconTintList);
            ImageViewCompat.setImageTintMode(headerIconImageView, headerIconTintMode);
            Drawable newIcon = headerIcon;

            if (animation != null && newIcon != null) {
                Drawable previousIcon = headerIconImageView.getDrawable();

                if (previousIcon != null) {
                    if (previousIcon instanceof AbstractTransitionDrawable) {
                        previousIcon = ((AbstractTransitionDrawable) previousIcon).getDrawable(1);
                    }

                    if (animation instanceof ScaleTransitionAnimation) {
                        ScaleTransitionDrawable transition =
                                new ScaleTransitionDrawable(new Drawable[]{previousIcon, newIcon});
                        transition.setListener(animation.getListener());
                        transition.startTransition(animation.getDuration());
                        newIcon = transition;
                    } else if (animation instanceof CircleTransitionAnimation) {
                        CircleTransitionAnimation circleTransitionAnimation =
                                (CircleTransitionAnimation) animation;
                        CircleTransitionDrawable transition =
                                new CircleTransitionDrawable(new Drawable[]{previousIcon, newIcon});
                        transition.setRadius(circleTransitionAnimation.getRadius());
                        transition.setListener(circleTransitionAnimation.getListener());

                        if (circleTransitionAnimation.getX() != null) {
                            transition.setX(circleTransitionAnimation.getX());
                        }

                        if (circleTransitionAnimation.getY() != null) {
                            transition.setY(circleTransitionAnimation.getY());
                        }

                        transition.startTransition(circleTransitionAnimation.getDuration());
                        newIcon = transition;
                    } else if (animation instanceof CrossFadeTransitionAnimation) {
                        CrossFadeTransitionDrawable transition = new CrossFadeTransitionDrawable(
                                new Drawable[]{previousIcon, newIcon});
                        transition.setCrossFade(true);
                        transition.setListener(animation.getListener());
                        transition.startTransition(animation.getDuration());
                        newIcon = transition;
                    } else {
                        throw new RuntimeException("Unknown type of animation: " +
                                animation.getClass().getSimpleName());
                    }
                }
            }

            headerIconImageView.setImageDrawable(newIcon);
        }
    }
104393
public static void animate(View imageView, int durationMillis) {
		if (imageView != null) {
			AlphaAnimation fadeImage = new AlphaAnimation(0, 1);
			fadeImage.setDuration(durationMillis);
			fadeImage.setInterpolator(new DecelerateInterpolator());
			imageView.startAnimation(fadeImage);
		}
	}
657904
void setSelectionInt(int position, boolean animate) {
        if (position != mOldSelectedPosition) {
            mBlockLayoutRequests = true;
            int delta  = position - mSelectedPosition;
            setNextSelectedPositionInt(position);
            layout(delta, animate);
            mBlockLayoutRequests = false;
        }
    }
968968
private void adaptHeaderBackground(@Nullable final BackgroundAnimation animation) {
        if (headerBackgroundImageView != null) {
            Drawable newBackground = headerBackground;

            if (animation != null && newBackground != null) {
                Drawable previousBackground = headerBackgroundImageView.getDrawable();

                if (previousBackground != null) {
                    if (previousBackground instanceof AbstractTransitionDrawable) {
                        previousBackground =
                                ((AbstractTransitionDrawable) previousBackground).getDrawable(1);
                    }

                    if (animation instanceof CircleTransitionAnimation) {
                        CircleTransitionAnimation circleTransitionAnimation =
                                (CircleTransitionAnimation) animation;
                        CircleTransitionDrawable transition = new CircleTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setRadius(circleTransitionAnimation.getRadius());
                        transition.setListener(circleTransitionAnimation.getListener());

                        if (circleTransitionAnimation.getX() != null) {
                            transition.setX(circleTransitionAnimation.getX());
                        }

                        if (circleTransitionAnimation.getY() != null) {
                            transition.setY(circleTransitionAnimation.getY());
                        }

                        transition.startTransition(circleTransitionAnimation.getDuration());
                        newBackground = transition;
                    } else if (animation instanceof CrossFadeTransitionAnimation) {
                        CrossFadeTransitionDrawable transition = new CrossFadeTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setListener(animation.getListener());
                        transition.startTransition(animation.getDuration());
                        newBackground = transition;
                    } else {
                        throw new RuntimeException("Unknown type of animation: " +
                                animation.getClass().getSimpleName());
                    }
                }
            }

            headerBackgroundImageView.setImageDrawable(newBackground);
        }
    }
684155
function (animation) {
            var chart = this,
              axes = chart.axes,
              series = chart.series,
              pointer = chart.pointer,
              legend = chart.legend,
              redrawLegend = chart.isDirtyLegend,
              hasStackedSeries,
              hasDirtyStacks,
              hasCartesianSeries = chart.hasCartesianSeries,
              isDirtyBox = chart.isDirtyBox, // todo: check if it has actually changed?
              seriesLength = series.length,
              i = seriesLength,
              serie,
              renderer = chart.renderer,
              isHiddenChart = renderer.isHidden(),
              afterRedraw = [];

            setAnimation(animation, chart);

            if (isHiddenChart) {
                chart.cloneRenderTo();
            }

            // Adjust title layout (reflow multiline text)
            chart.layOutTitles();

            // link stacked series
            while (i--) {
                serie = series[i];

                if (serie.options.stacking) {
                    hasStackedSeries = true;

                    if (serie.isDirty) {
                        hasDirtyStacks = true;
                        break;
                    }
                }
            }
            if (hasDirtyStacks) { // mark others as dirty
                i = seriesLength;
                while (i--) {
                    serie = series[i];
                    if (serie.options.stacking) {
                        serie.isDirty = true;
                    }
                }
            }

            // handle updated data in the series
            each(series, function (serie) {
                if (serie.isDirty) { // prepare the data so axis can read it
                    if (serie.options.legendType === 'point') {
                        redrawLegend = true;
                    }
                }
            });

            // handle added or removed series
            if (redrawLegend && legend.options.enabled) { // series or pie points are added or removed
                // draw legend graphics
                legend.render();

                chart.isDirtyLegend = false;
            }

            // reset stacks
            if (hasStackedSeries) {
                chart.getStacks();
            }


            if (hasCartesianSeries) {
                if (!chart.isResizing) {

                    // reset maxTicks
                    chart.maxTicks = null;

                    // set axes scales
                    each(axes, function (axis) {
                        axis.setScale();
                    });
                }

                chart.adjustTickAmounts();
            }

            chart.getMargins(); // #3098

            if (hasCartesianSeries) {
                // If one axis is dirty, all axes must be redrawn (#792, #2169)
                each(axes, function (axis) {
                    if (axis.isDirty) {
                        isDirtyBox = true;
                    }
                });

                // redraw axes
                each(axes, function (axis) {

                    // Fire 'afterSetExtremes' only if extremes are set
                    if (axis.isDirtyExtremes) { // #821
                        axis.isDirtyExtremes = false;
                        afterRedraw.push(function () { // prevent a recursive call to chart.redraw() (#1119)
                            fireEvent(axis, 'afterSetExtremes', extend(axis.eventArgs, axis.getExtremes())); // #747, #751
                            delete axis.eventArgs;
                        });
                    }

                    if (isDirtyBox || hasStackedSeries) {
                        axis.redraw();
                    }
                });
            }

            // the plot areas size has changed
            if (isDirtyBox) {
                chart.drawChartBox();
            }


            // redraw affected series
            each(series, function (serie) {
                if (serie.isDirty && serie.visible &&
                  (!serie.isCartesian || serie.xAxis)) { // issue #153
                    serie.redraw();
                }
            });

            // move tooltip or reset
            if (pointer) {
                pointer.reset(true);
            }

            // redraw if canvas
            renderer.draw();

            // fire the event
            fireEvent(chart, 'redraw'); // jQuery breaks this when calling it from addEvent. Overwrites chart.redraw

            if (isHiddenChart) {
                chart.cloneRenderTo(true);
            }

            // Fire callbacks that are put on hold until after the redraw
            each(afterRedraw, function (callback) {
                callback.call();
            });
        }
839879
public static void exports(Xml root, Animation animation)
    {
        Check.notNull(root);
        Check.notNull(animation);

        final Xml node = root.createChild(ANIMATION);
        node.writeString(ANIMATION_NAME, animation.getName());
        node.writeInteger(ANIMATION_START, animation.getFirst());
        node.writeInteger(ANIMATION_END, animation.getLast());
        node.writeDouble(ANIMATION_SPEED, animation.getSpeed());
        node.writeBoolean(ANIMATION_REVERSED, animation.hasReverse());
        node.writeBoolean(ANIMATION_REPEAT, animation.hasRepeat());
    }
453555
public void showWithAnimationWithListener(Animator.AnimatorListener animatorListener) {
		scrollDirection = SCROLL_TO_TOP;
		ObjectAnimator objectAnimator = objectAnimatorFactory.getObjectAnimator(animatedView, ANIMATION_TYPE, HIDDEN_Y_POSITION);
		if (animatorListener != null) {
			objectAnimator.addListener(animatorListener);
		}
		objectAnimator.setDuration(durationInMillis);
		objectAnimator.start();
	}
1326621
private void animateFloatingLabel(boolean up, boolean animation) {
        if (promptTextSupplier.get() == null) {
            return;
        }
        if (up) {
            if (promptTextSupplier.get().getTranslateY() != -contentHeight) {
                unfocusTimer.stop();
                runTimer(focusTimer, animation);
            }
        } else {
            if (promptTextSupplier.get().getTranslateY() != 0) {
                focusTimer.stop();
                runTimer(unfocusTimer, animation);
            }
        }
    }
968396
public void setAnimationBackend(@Nullable T animationBackend) {
    mAnimationBackend = animationBackend;
    if (mAnimationBackend != null) {
      applyBackendProperties(mAnimationBackend);
    }
  }
1349504
public void setIcon(final Image IMAGE) {
        if (null == icon) {
            _icon = IMAGE;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            icon.set(IMAGE);
        }
    }
1212289
private Animator preparePressedAnimation() {
        Animator animation = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.CIRCLE_SCALE_PROPERTY,
                drawable.getCircleScale(), 0.65f);
        animation.setDuration(120);
        return animation;
    }
499541
public final void setDialogHeaderIcon(@DrawableRes final int resourceId) {
        this.dialogHeaderIcon = AppCompatResources.getDrawable(getContext(), resourceId);
        this.dialogHeaderIconBitmap = null;
        this.dialogHeaderIconId = resourceId;
    }
1229035
protected void animate(int translationY) {
		ObjectAnimator animator = objectAnimatorFactory.getObjectAnimator(animatedView, ANIMATION_TYPE, translationY);
		animator.setDuration(durationInMillis);
		animator.start();
	}
617498
public void startBackgroundIconRotateAnimation() {
        // init infinite animation of no animation was previously configured.
        if (backgroundRotateAnimation == null) {
            startForegroundIconRotateAnimation(0d, 360d, Animation.INDEFINITE, JFXConstants.ANIMATION_DURATION_ROTATION_DEFAULT, Interpolator.LINEAR, false);
            return;
        }
        backgroundRotateAnimation.play();
    }
563429
public void setAnimationBackend(@Nullable AnimationBackend animationBackend) {
    mAnimationBackend = animationBackend;
    if (mAnimationBackend != null) {
      mFrameScheduler = new DropFramesFrameScheduler(mAnimationBackend);
      mAnimationBackend.setBounds(getBounds());
      if (mDrawableProperties != null) {
        // re-apply to the same drawable so that the animation backend is updated.
        mDrawableProperties.applyTo(this);
      }
    }
    mFrameScheduler = createSchedulerForBackendAndDelayMethod(mAnimationBackend);
    stop();
  }
962128
public void setIcon(String icon)
    {
        ExtendedInfo info = getInfo(icon);
        if (info != null)
            info._icon = icon;
    }
1176533
protected void processAnimations(FragmentAnimation animation, FragmentTransaction ft) {
        if (animation != null) {
            if (animation.isCompletedAnimation()) {
                ft.setCustomAnimations(animation.getEnterAnim(), animation.getExitAnim(),
                        animation.getPushInAnim(), animation.getPopOutAnim());
            } else {
                ft.setCustomAnimations(animation.getEnterAnim(), animation.getExitAnim());
            }
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
                for (LollipopAnim sharedElement : animation.getSharedViews()) {
                    ft.addSharedElement(sharedElement.view, sharedElement.name);
                }
        }
    }