Animate Dialogfragment

Showing 1-2 of 2 messages
Animate Dialogfragment Christer Nordvik 6/11/11 2:08 PM
Is it possible to animate a DialogFragment when it appears? I want a
flip animation (from zero width and then "flip" into view, but nothing
happens when I try to animate it.

I asked the question here also (no answers):

My relevant code:

FragmentTransaction ft =
InfoDialogFragment newFragment = InfoDialogFragment.newInstance();
ft.setCustomAnimations(R.anim.grow_in, R.anim.fadeout);
ft.add(newFragment, "dialog");
public class InfoDialogFragment extends DialogFragment {
Re: [android-developers] Animate Dialogfragment Dianne Hackborn 6/11/11 6:48 PM
This has nothing to do with fragments; DialogFragment is just a wrapper around a Dialog to help manage its lifecycle.  Dialogs are top-level windows so their animations are window animations, just like when you use Dialog in all other situations.  You thus control the animations of dialogs through the theme or explicit window animation style you have set in its WindowManager.LayoutParams.

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.