Setting up an AnimationListener for an ObjectAnimator
Since you implemented AnimatorListener in your MainActivity, you must include all its abstract methods, and change nAnim.addListener(new Animat....
to nAnim.addListener(this)
@Override
public void onAnimationStart(Animator animation){
}
@Override
public void onAnimationEnd(Animator animation){
startGame(level)
}
@Override
public void onAnimationRepeat(Animator animation){
}
@Override
public void onAnimationCancel(Animator animation){
}