Is it possible to animate a DialogFragment?

牧云@^-^@ 提交于 2019-12-10 13:49:12

问题


I tried various samples regarding animation of fragments, but nothing happens so is DialogFragment not a "proper" fragment? Or am I missing something here?

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 {

回答1:


Here is what a Google engineer has to say on the subject.



来源:https://stackoverflow.com/questions/6129567/is-it-possible-to-animate-a-dialogfragment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!