Does anyone have a sample how to use ActionBarSherlock with latest 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.
There's also LegacyBar but also I couldn't find a sample with 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.
For activities, MvvmCross adapts activities into data-binding using a couple of small layers of code to add:
- lifecyle events
- a data-binding context
This code is described in MVVMCross for android - how to do binding in code?
If you follow the two steps from the 'Additionally' section in that question, then that should enable you to create an MvxSherlockActivity
For fragments, there's no detailed existing answer here on SO, but the process is basically the same two steps with:
- an event layer like - https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/EventSource/MvxEventSourceFragment.cs
- a data-binding layer like - https://github.com/slodge/MvvmCross/blob/v3/Cirrious/Cirrious.MvvmCross.Droid.Fragging/Fragments/MvxFragment.cs
This same code should allow someone to create an MvxFooFragment
from any FooFragment