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):
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 {
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 android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hac...@android.com

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.