@Override
    public void onGenerated(Palette palette) {

        if (palette != null) {

            final Swatch darkVibrantSwatch    = palette.getDarkVibrantSwatch();
            final Swatch darkMutedSwatch      = palette.getDarkMutedSwatch();
            final Swatch lightVibrantSwatch   = palette.getLightVibrantSwatch();
            final Swatch lightMutedSwatch     = palette.getLightMutedSwatch();
            final Swatch vibrantSwatch        = palette.getVibrantSwatch();

            final Swatch backgroundAndContentColors = (darkVibrantSwatch != null)
                ? darkVibrantSwatch : darkMutedSwatch;

            final Swatch titleAndFabColors = (darkVibrantSwatch != null)
                ? lightVibrantSwatch : lightMutedSwatch;

            setBackgroundAndFabContentColors(backgroundAndContentColors);

            setHeadersTitlColors(titleAndFabColors);

            setVibrantElements(vibrantSwatch);
        }
    }
Starts an animation provided by a <animation-drawable> on Lollipop &
higher versions, in lower versions a simple set with a scale and a rotate
animation is shown
HackVG/app/src/main/java/com/hackvg/android/views/activities/MovieDetailActivity.java