EnterAnimation无法正常工作MvxFragment

问题描述:

我正在使用MVVMCross5 for Android。我没有与片段导航问题,但片段动画无法正常工作。我在片段定义上的MvxFragmentPresentation属性上使用EnterAnimation属性。我错过了什么?以下是我的片段定义:EnterAnimation无法正常工作MvxFragment

[MvxFragmentPresentation(ActivityHostViewModelType = typeof(MainViewModel), FragmentContentId = Resource.Id.frame_layout, AddToBackStack = true, EnterAnimation = Android.Resource.Animation.SlideInLeft)] 
public class LabelRequestDetailFragment : BaseFragment<LabelRequestDetailViewModel> 
{ 
    public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
    { 
     base.OnCreateView(inflater, container, savedInstanceState); 
     return this.BindingInflate(Resource.Layout.label_request_detail, null); 
    } 
} 

您需要同时设置EnterAnimation和ExitAnimation以使其工作。

This在源代码行中进行检查。

此限制的原因是Android SDK需要两个参数。

+0

谢谢。它在设置EnterAnimation和ExitAnimation资源之后起作用,但现在只显示输入动画但不退出动画。 –