我尝试了各种有关 fragment 动画的示例,但没有任何反应,所以 DialogFragment 不是“正确的” fragment 吗?还是我在这里遗漏了什么?
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 {
最佳答案
Here是 Google 工程师就此主题所说的话。
关于android - 是否可以为 DialogFragment 设置动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6129567/