0

我在 MVVMCross https://github.com/slodge/MvvmCross
中使用 MvxListView 我将 FooterView 添加到 MvxListView 如下:

 LayoutInflater _inflatorservice = (LayoutInflater)this.GetSystemService(Context.LayoutInflaterService);
        View view = _inflatorservice.Inflate(Resource.Layout.footer_layout,null,false);
        listView.AddFooterView(view);

但是当我运行应用程序时,我在 ListView 中看不到页脚视图。
如何在 MvxListView 中显示页脚视图?谢谢

4

1 回答 1

1

I think you need to set the footer before the Adapter is set?

This was raised in an issue - https://github.com/slodge/MvvmCross/issues/331

The fix was to allow advanced users to inherit a custom control (see N=18 in N+1 days of MvvmCross) which inherits from MvxListView and which passes null down as the Adapter in the constructor. The custom control then needs to set the footer view and then set the MvxAdapter.

This isn't something I've personally done - but the feedback was that this worked.

于 2013-08-11T05:46:13.713 回答