public static void applyShakeAnimation(Context context, View view) {
        Animation shake;
        shake = AnimationUtils.loadAnimation(context, R.anim.mi_shake);
        view.startAnimation(shake);
    }
Utility methods for working with animations.
library/src/main/java/com/heinrichreimersoftware/materialintro/util/AnimUtils.java