MvvmCross + ActionBarCompat (v7 Support)

If you are using MvvmCross (if you aren’t you should) then you might notice that there is no official MvxActionBarActivity to use. This is sad because if you are using the new Support v7 Library then this will be a must. I am sure Stuart is going to add this or create a NuGet for it, but you can do it today by creating 2 new classes.

Since MvxActivity inherits from MvxEventSourceActivity you will need to re-implement these classes. Usually this would be frowned upon as the framework is always changing, but these things have been around for ever and don’t really need updating. So here is what you will need to copy in:

Boom you are all set