Created
September 11, 2015 08:26
-
-
Save dolphinziyo/5f4f26f37ecfe5e3c79f to your computer and use it in GitHub Desktop.
Animate a Layout using the Android Property Animation System
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void animateLayout(boolean mostrar) { | |
AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(this, R.animator.slide_in_up); | |
set.addListener(new Animator.AnimatorListener() { | |
@Override | |
public void onAnimationStart(Animator animation) { | |
} | |
@Override | |
public void onAnimationEnd(Animator animation) { | |
layout.setVisibility(View.GONE); | |
} | |
@Override | |
public void onAnimationCancel(Animator animation) { | |
} | |
@Override | |
public void onAnimationRepeat(Animator animation) { | |
} | |
}); | |
set.setTarget(layout); | |
set.start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment