TAG: Xamarin

Navigation

Presenters in MvvmCross: Navigating Android with Fragments

In my last couple posts on this subject I've mentioned using fragments on Android for navigation. By default MvvmCross will use activities on Android, but as I hope you've learned by now, you can use presenters to customize this sort of thing as much as you'd like. I've found it very difficult (or impossible) to properly achieve the types of fine-grained navigation control I want in my apps by using activities for all my views, which…

Presenters in MvvmCross: Controlling the Back Stack

In my last presenter post I showed how you can use presentation hints to tell the presenter to clear the view stack prior to showing the next view. That is probably the most common custom navigation pattern I've seen used in MvvmCross apps, but I also wanted to note another similar pattern I've used as well. When I'm mapping out the navigation paths through my apps, I try to be very conscious of the state of…

Presenters in MvvmCross: Using Presentation Values

As shown in my last post, a MvxViewModelRequest contains a dictionary named PresentationValues that can be very useful in passing around data that your presenter might find useful. Let's say you that in your view model you know that when you request to show a view model you know that you want to clear the app's back stack before showing it, such as after a login operation so that the login screen is no longer in…

Driving Xamarin's Android Player from the Command Line

As part of our effort to automate taking screenshots, we also need the ability to spin up Android emulators via the command line. This all needs to run headless, so it's necessary to be able to spin up Android emulators from the command line. A quick look at my ps output showed this to be even simpler a task than I'd anticipated. To launch a new instance of the Android Player from the command line, all…

Presenters in MvvmCross: A Primer

Use a custom presenter -- Me, at least once a week in #mvvmcross Having been involved in the MvvmCross community for several years now, often it feels like my most common response to questions in the #mvvmcross JabbR room from someone new to the framework is to look into using a custom presenter. Presenters are an important piece of the MvvmCross architecture, but that's not necessarily obvious when you're first getting into things. A long time…