可扩展列表中的组单击事件
Group Click event in Expandable List
MvxExpandableListView 是否可以自定义组点击事件?.我曾尝试通过提供命令来使用 GroupClick,但没有成功。如果没有可用的子项,我想使用 GroupClick 事件。
我终于可以让它工作了。
不要在代码中设置GroupClick 属性,而是在xml中绑定这个属性,并提供相应的命令进行绑定。
<Mvx.MvxExpandableListView
android:id="@+id/toclist"
android:layout_width="match_parent"
android:layout_height="match_parent"
local:MvxBind="ItemsSource SegmentTasks; ItemClick SelectTicketItemCommand; GroupClick SelectTicketParentCommand"
local:MvxItemTemplate="@layout/ticketlistchildview"
local:GroupItemTemplate="@layout/listticketitem"
android:background="@android:color/white"
android:groupIndicator="@null"
android:childDivider="#00000000"/>
MvxExpandableListView 是否可以自定义组点击事件?.我曾尝试通过提供命令来使用 GroupClick,但没有成功。如果没有可用的子项,我想使用 GroupClick 事件。
我终于可以让它工作了。
不要在代码中设置GroupClick 属性,而是在xml中绑定这个属性,并提供相应的命令进行绑定。
<Mvx.MvxExpandableListView
android:id="@+id/toclist"
android:layout_width="match_parent"
android:layout_height="match_parent"
local:MvxBind="ItemsSource SegmentTasks; ItemClick SelectTicketItemCommand; GroupClick SelectTicketParentCommand"
local:MvxItemTemplate="@layout/ticketlistchildview"
local:GroupItemTemplate="@layout/listticketitem"
android:background="@android:color/white"
android:groupIndicator="@null"
android:childDivider="#00000000"/>