问题描述
我使用MvvmCross框架.我想根据ViewModel类型在一个listview中使用不同的项目模板.例如,我有AnimalViewModels的列表.而且我希望KittenViewModel和PuppyViewModel看起来有所不同.
I use MvvmCross framework.I want to use different item templates in one listview depending on ViewModel type.For example I have the list of AnimalViewModels. And I want KittenViewModel and PuppyViewModel look different.
我了解了如何在iOS和WP7中执行此操作.如何在Android中实现此功能.
I found out how to do this in iOS and WP7. How to implement this in Android.
谢谢
推荐答案
一些示例展示了如何使用单元格类型选择.参见:
A few of the samples show how to use cell type selection. See:
分组列表中https://github.com/slodge/MvvmCross-Tutorials/tree/master/Sample%20-%20CirriousConference
grouped lists in the session list views in https://github.com/slodge/MvvmCross-Tutorials/tree/master/Sample%20-%20CirriousConference
这篇关于mvvmcross Android中一个列表框中的多个项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!