MvvmCross and the Navigation Drawer

In my previous post, I talked about implementing an auto return toolbar using AppCompat and MvvmCross.

I indicated that it’s really important for MvvmCross to support toolbars in the layout and I went on to show some problems I’ve encountered with MvvmCross and toolbars in the layout in previous versions of the framework.

Today I’m going to show you another reason why you’d want to include a toolbar in the layout of an activity rather than letting the AppCompat theme do it for your automatically.

And this time it’s not to implement a feature as niche as an auto return toolbar. It’s to implement a feature that is becoming the defacto navigation standard for Material Design applications - the Navigation Drawer (a.k.a the hamburger menu).

Gmail Navigation Drawer

First, I’m going to implement a navigation drawer with standard Xamarin. After I get that working, I’ll add MvvmCross and implement each individual “page” as a view model.

So let’s go…

Read more »

MvvmCross and AppCompat Toolbar

One of the very cool things about Android programming with Xamarin is that anything that can be implemented for Android with Java can also be implemented with C#.

For example, say the designer on your project designs an activity with a quick return toolbar… Since this is possible to do on any modern version of Android with the Android AppCompat Library in Java, it should be just as easy to do in a Xamarin application with C#.

Unless you are using a framework on top of Xamarin Android. Then all bets are off.

This post shows the problems I encountered with implementing a quick return toolbar with Xamarin Android and the latest stable version (until two weeks ago) of MvvmCross - v3.5.1.

Read more »