【问题标题】:How to add footerview to MvxListView如何将页脚视图添加到 MvxListView
【发布时间】:2013-08-11 04:31:54
【问题描述】:

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

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

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

【问题讨论】:

    标签: android-listview mono xamarin.android mvvmcross


    【解决方案1】:

    我认为您需要在设置适配器之前设置页脚?

    这是在一个问题中提出的 - https://github.com/slodge/MvvmCross/issues/331

    修复是允许高级用户继承一个自定义控件(参见N+1 days of MvvmCross 中的 N=18),该控件继承自 MvxListView,并将null 作为构造函数中的适配器向下传递。然后自定义控件需要设置footer view,然后设置MvxAdapter。

    这不是我亲自做过的事情 - 但反馈说这很有效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-09
      • 2015-09-23
      • 2016-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-03
      相关资源
      最近更新 更多