Several item templates in one listbox in mvvmcross Android

坚强是说给别人听的谎言 提交于 2019-12-11 06:37:52

问题


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.

I found out how to do this in iOS and WP7. How to implement this in Android.

Thank you


回答1:


A few of the samples show how to use cell type selection. See:

  • polymorphic lists in https://github.com/slodge/MvvmCross-Tutorials/tree/master/Working%20With%20Collections

  • grouped lists in the session list views in https://github.com/slodge/MvvmCross-Tutorials/tree/master/Sample%20-%20CirriousConference



来源:https://stackoverflow.com/questions/17341590/several-item-templates-in-one-listbox-in-mvvmcross-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!