Here is what I do:
a. The FragmentDialog has an layout inflated within onCreateView
` View layout = inflater.inflate(R.layout.my_layout, null);
layMain = (LinearLayout) layout.findViewById(R.id.layMain);
final Animation anim = AnimationUtils.loadAnimation(getActivity(), R.anim.translate_from_bottom);
layMain.startAnimation(anim);`
b. The animation on creation works fine. However, I need to find a way, on dismiss (for example when the user presses the Back button) to run an animation and after that dismiss the FragmentDialog
c. I don't want to use android:windowEnterAnimation
/ android:windowExitAnimation
as not all devices have animation active in Developer menu, and I need to run the animation on all cases.
So basically, what event should I override in order to run the animation, and on animation end to make the dismiss operation ?