MvvmCross.Android.Controls.SectionedRecyclerView

A simple Sectioned/Grouped RecyclerView


Keywords
mvvm, mvvmcross, cross, xamarin, android, forms, monodroid, xamarin.android, xamarin.forms, net, net45, netcore, support, recyclerview, sectionedrecyclerview
Install
Install-Package MvvmCross.Android.Controls.SectionedRecyclerView -Version 1.0.0

Documentation

MvvmCross-Android-Controls

Controls for MvvmCross Android

SectionedRecyclerView

A simple sectioned/grouped recycler view for MvvmCross apps

Basic Usage

Install from NuGet:

Install-Package MvvmCross.Controls.Android.SectionedRecyclerView

Add an MvxSectionedRecycler view to your layout axml file.

  <MvvmCross.Controls.Android.SectionedRecyclerView.MvxSectionedRecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        local:MvxBind="ItemsSource GroupedItems"
        local:MvxItemTemplate="@layout/listitem"
        local:MvxGroupItemTemplate="@layout/listheaderitem" />

The data source should be a list (or observable collection) of objects with a string Key and an IEnumerable Items for the objects in that section.

The MvxItemTemplate is the same as in MvxRecyclerView The MvxGroupItemTemplate is the header template which will bind to the group object itself

Check the sample for an example of a grouped observable collection