[英]Sectioned RecyclerView in mvvmcross android
我正在嘗試使RecyclerView看起來像以下部分
我正在使用mvvmcross和到目前為止的xml是這樣的:
<MvvmCross.Droid.Support.V7.RecyclerView.MvxRecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
fab:MvxBind="ItemsSource EmballageGroups"
fab:MvxTemplateSelector="Hocras.OnRoute.Droid.TypeTemplateSelector,Hocras.OnRoute.Droid" />
但這是一個沒有節的簡單列表。 如何在其中找到板塊? (必須按產品類型細分)
在這里看看示例https://github.com/MvvmCross/MvvmCross-Samples/tree/master/WorkingWithCollections
它使用MvxExpandableListView
<Mvx.MvxExpandableListView
android:layout_width="match_parent"
android:layout_height="match_parent"
local:MvxItemTemplate="@layout/listitem_kitten"
local:MvxGroupItemTemplate="@layout/listitem_expandablegroup"
local:MvxBind="ItemsSource KittenGroups" />
Android ExpandableListView是一個視圖,用於在垂直滾動的兩級列表中顯示項目。 它與ListView不同,它允許兩個級別,這兩個級別是可以通過觸摸查看及其各自的子項輕松擴展和折疊的組。 android中的ExpandableListViewAdapter將數據加載到與此視圖關聯的項目中。
以下是此類使用的一些重要方法:請在下面的鏈接中找到完整的信息
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.