是否有可能进行动画一个DialogFragment? [英] Is it possible to animate a DialogFragment?

查看:203
本文介绍了是否有可能进行动画一个DialogFragment?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过各种样品关于片段动画,但没有任何反应所以DialogFragment不是一个正确的片段?还是我失去了一些东西在这里?

  FragmentTransaction英尺= getFragmentManager()调用BeginTransaction()。
InfoDialogFragment newFragment = InfoDialogFragment.newInstance();
newFragment.setAsset(mainShow,C,backgroundDrawable);
ft.setCustomAnimations(R.anim.grow_in,R.anim.fadeout);
ft.add(newFragment,对话);
ft.commit();
...
公共类InfoDialogFragment扩展DialogFragment {


解决方案

<一个href=\"http://groups.google.com/group/android-developers/browse_thread/thread/d28096a900b83f0c?pli=1\">Here是一个谷歌工程师有话要说。

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 {

解决方案

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

这篇关于是否有可能进行动画一个DialogFragment?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆