2011-05-25 31 views
6

我嘗試了各種關於片段動畫的示例,但沒有任何反應,因此DialogFragment不是「正確的」片段?或者我在這裏錯過了什麼?是否可以爲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 { 

回答

7

Here是Google工程師在這個問題上的說法。

相關問題