2011-05-25 3 views
6

J'ai essayé différents samples concernant l'animation de fragments, mais rien ne se passe donc DialogFragment n'est pas un fragment "correct"? Ou est-ce que je manque quelque chose ici?Est-il possible d'animer un DialogFragment?

FragmentTransaction ft = getFragmentManager().beginTransaction();          
InfoDialogFragment newFragment = InfoDialogFragment.newInstance(); 
newFragment.setAsset(mainShow, c,backgroundDrawable); 
ft.setCustomAnimations(R.anim.grow_in, R.anim.fadeout); 
ft.add(newFragment, "dialog"); 
ft.commit(); 
... 
public class InfoDialogFragment extends DialogFragment { 

Répondre

7

Here est ce qu'un ingénieur de Google a à dire sur le sujet.

Questions connexes