2

I have updated the MvvmCross library from 3.0.12 to 3.0.14 and the items selection stopped working for MvxListViews.

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 version works well (selected items keeps checked)
  • 3.0.14 version breaks the behavior

Do i have to change something in my code or is it a bug of the Framework?

I am using API Level 12 for the project.

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>

And i am selecting the items through the SetItemChecked(position, isChecked); method.

AlexGuti
  • 3,063
  • 1
  • 27
  • 28
  • 1
    Probably linked to https://github.com/MvvmCross/MvvmCross/issues/481 – Stuart Dec 02 '13 at 15:55
  • Thanks @Stuart, it looks like it's the same issue. I'm currently using 3.0.12 for my Droid projects. Is there any workaround or prevision of fix? Thanks again! – AlexGuti Dec 02 '13 at 16:05

1 Answers1

1

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

Martijn00
  • 3,569
  • 3
  • 22
  • 39