AlexGuti
AlexGuti

Reputation: 3243

MvvmCross 3.0.14 - MvxListView selection not working in Android

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.

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.

Upvotes: 2

Views: 496

Answers (1)

Martijn00
Martijn00

Reputation: 3559

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

Upvotes: 1

Related Questions