Is it possible to animate a DialogFragment?

2019-06-18 19:03发布

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条回答
该账号已被封号
2楼-- · 2019-06-18 19:31

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

查看更多
登录 后发表回答