Xamarin.Android Features

Presented below is the list of features which MugenMvvm provides to Xamarin.Android:

  • Work with Activity is supported. There are exists MugenMvvm implementation for each of standard Android Activity (name convention is 'Mvvm'+<activity's name>). In order to successfully work with MugenMvvm you must inherit appropriate Mvvm implementation of Activity. For instance, if you would match a Activity with a ViewModel, so after you call ShowAsync navigation on Activity of this type will be made.
  • Work with Fragment is supported. There are exists MugenMvvm implementation for each of standard Android Fragment (name convention is 'Mvvm'+<fragment's name>). In order to successfully work with MugenMvvm you must inherit appropriate Mvvm implementation of Fragment. For instance, if you would match a MvvmDialogFragment with a ViewModel, so after you call ShowAsync method instance will be shown.
  • State control for Activity and Fragment is supported. States of any Activity or Fragment are tracked "behind the scene", therefore you haven't manually invoke methods for save/restore the state of ViewModel.
  • Back stack navigation is supported.
  • Markup binding is supported. In order to use binding on Android one must add the next namepace in xml file:
xmlns:pkg="http://schemas.android.com/apk/res-auto

After that Bind attribute is available to use in xml layout.

  • Bindings for ActionBar, Toolbar, PopupMenu and OptionsMenu are supported.
  • There is implemented a conception of DataTemplateSelector, so one can select view template dynamically in runtime. This DataTemplateSelector is analogue of conception of DataTemplateSelector for Xaml platform (WPF, WinRT, etc).
  • Validation with usage of standard TextView.Error property is supported.