ActionBarSherlock与最新MVVMCross [英] ActionBarSherlock with latest MVVMCross

查看:155
本文介绍了ActionBarSherlock与最新MVVMCross的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有一个样本如何使用ActionBarSherlock与最新MVVMCross?

Does anyone have a sample how to use ActionBarSherlock with latest MVVMCross?

有Roosmaa / MvvmCross.ActionBarSherlock,但它不与最新的MVVMCross工作,我不知道它是用于生产如何准备好了。

There's Roosmaa / MvvmCross.ActionBarSherlock but it doesn't work with latest MVVMCross and I am not sure how ready it is for production use.

还有LegacyBar也是我无法找到MVVMCross一个样本。

There's also LegacyBar but also I couldn't find a sample with MVVMCross.

推荐答案

我相信LegacyBar已用于MvvmCross - 这样肯定会是一个选择

I believe LegacyBar has been used with MvvmCross - so that certainly could be an option for you.

另外,另一个可用的选项是将数据绑定支持添加到夏洛克的活动和/或片段。

Alternatively, another available option is to add data-binding support to the activities and/or fragments in Sherlock.

有关活动,MvvmCross适应活动纳入使用一对夫妇的code小图层添加数据绑定:

For activities, MvvmCross adapts activities into data-binding using a couple of small layers of code to add:

  1. 在生命周期事件
  2. 数据绑定上下文

这code在<一个描述href="http://stackoverflow.com/questions/16724278/mvvmcross-for-android-how-to-do-binding-in-$c$c">MVVMCross Android的 - 如何做code结合

如果您按照从这个问题了。此外部分中的两个步骤,那么就应该使您能够创建一个 MvxSherlockActivity

If you follow the two steps from the 'Additionally' section in that question, then that should enable you to create an MvxSherlockActivity

有关片段,有没有详细的现有位置上SO答案,但这个过程是基本一致的两步:

For fragments, there's no detailed existing answer here on SO, but the process is basically the same two steps with:

  1. 在事件层像 - <一个href="https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/EventSource/MvxEventSourceFragment.cs">https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/EventSource/MvxEventSourceFragment.cs
  2. 数据绑定层一样 - <一个href="https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/MvxFragment.cs">https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/MvxFragment.cs
  1. an event layer like - https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/EventSource/MvxEventSourceFragment.cs
  2. a data-binding layer like - https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/MvxFragment.cs

这同样code应该让别人来创建一个 MvxFooFragment 任何 FooFragment

This same code should allow someone to create an MvxFooFragment from any FooFragment

这篇关于ActionBarSherlock与最新MVVMCross的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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