Here is how I have done this in the past: 1. Create the animations you want in XML 2. Create a new style in XML for your dialog that inherits an already existing Android dialog style 3. Override android:windowEnterAnimation and android:windowExitAnimation with the animations you created in step 1 4. Create your dialog in code and specify the style you want it to use.
A couple things to note: 1. You can't do this with AlertDialog. To get around this, I had to create my own subclass of Dialog that behaved like AlertDialog. 2. I did this before DialogFragment was part of the API. However, the steps should be more or less the same. Your dialog will just be created inside your DialogFragment class and that is where you will call the constructor and specify the style. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jun 17, 2013 at 11:55 PM, Sadhna Upadhyay <[email protected] > wrote: > Hi guys, > i am trying to add animation in dialog fragment animation should be > like, > when i click on button then dialog page should come from top and again > when i click on dismiss then it should be go up. > > please help me if anyone have any idea. > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

