Controls for MvvmCross Android
A simple sectioned/grouped recycler view for MvvmCross apps
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