问题描述
我从3.0.12的MvvmCross库更新到3.0.14和项目选择停止MvxListViews工作。
I have updated the MvvmCross library from 3.0.12 to 3.0.14 and the items selection stopped working for MvxListViews.
我创建了一个来显示这一点。该项目包含具有相同code两个解决方案,但不同版本的MvvmCross库。
I've created a simple example from the first demo application to display this. The project contains two solutions with the same code but different versions of the MvvmCross Library.
- 3.0.12版本的作品很好(所选项目不断检查)
- 3.0.14版本打破了行为
我必须改变的东西在我的code或者是它的框架的一个bug?
Do i have to change something in my code or is it a bug of the Framework?
我使用的API等级12的项目。
I am using API Level 12 for the project.
为ListView项目的绘制如下:
The drawable for the ListView items is the following:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/list_item_pressed" android:state_pressed="true"/>
<item android:drawable="@color/list_item_selected" android:state_selected="true"/>
<item android:drawable="@color/list_item_selected" android:state_activated="true"/>
<item android:drawable="@color/list_item_default"/>
</selector>
而我选择通过项目 SetItemChecked(位置,器isChecked);
法
推荐答案
此问题已在MvvmCross 3.1.1。见GitHub的评论获取更多信息:
This issue is fixed in MvvmCross 3.1.1. See the Github comments for more information: https://github.com/MvvmCross/MvvmCross/issues/481#issuecomment-34273157
这篇关于MvvmCross 3.0.14 - MvxListView选择在Android中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!