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.

On Sat, Jun 11, 2011 at 2:08 PM, Christer Nordvik <[email protected]>wrote:

> 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):
>
> http://stackoverflow.com/questions/6129567/is-it-possible-to-animate-a-dialogfragment
>
> My relevant code:
>
> FragmentTransaction ft =
> getFragmentManager().beginTransaction();
> InfoDialogFragment newFragment = InfoDialogFragment.newInstance();
> ft.setCustomAnimations(R.anim.grow_in, R.anim.fadeout);
> ft.add(newFragment, "dialog");
> ft.commit();
> ...
> public class InfoDialogFragment extends DialogFragment {
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

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.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to