【问题标题】:DialogFragment animation not working for API <= 15DialogFragment 动画不适用于 API <= 15
【发布时间】:2014-06-30 14:11:03
【问题描述】:

我正在尝试为我的对话框片段制作一个简单的向左滑入/向右滑出动画。我的片段扩展了 SherlockDialogFragment,我在 onCreateDialog 中设置了动画:

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.getWindow().getAttributes().windowAnimations = R.style.dialog_animation;
    return dialog;
}

问题是动画不适用于 API

【问题讨论】:

    标签: android animation actionbarsherlock dialogfragment


    【解决方案1】:

    我的代码显然没有任何问题。我的测试设备关闭了动画。我只需要重新打开它,完成后一切正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-26
      • 2013-11-05
      • 2015-03-04
      • 1970-01-01
      • 2018-04-11
      • 1970-01-01
      • 2016-11-04
      • 2016-02-22
      相关资源
      最近更新 更多