I want to set a buttons visibility after the animation is finished.
That's what calls the animation:
android.support.v4.app.FragmentTransaction fAnimation = this.getActivity().getSupportFragmentManager().beginTransaction();
fAnimation.setCustomAnimations(android.R.anim.slide_in_left, R.anim.pull_out_to_left);
if (this.isVisible()) {
fAnimation.hide(this);
fAnimation.commit();
}
// code that will be executed when the fragment is gone (after the animation is over)
Is there any way to attach a listener to know when my fragment is gone?
See Question&Answers more detail:os