Mvvmcross: MvxExpandableListView GroupClick binding replaces group expanding functionality

Created on 27 Nov 2017  路  1Comment  路  Source: MvvmCross/MvvmCross

Steps to reproduce :scroll:

  1. Bind 'GroupClick' on an MvxExpandableListView

  2. MvxExpandableListView group doesn't expand any more, but the code inside the command works

Expected behavior :thinking:

Additionally expand the group besides executing the code in the command

Actual behavior :bug:

The code inside the command works, but the group doesn't get expanded

Configuration :wrench:

Version: 5.4.2

Platform:

  • [x] :robot: Android
  • [ ] :iphone: iOS
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [ ] :monkey: Xamarin.Forms

I am trying to do some additional stuff when a user taps on a group of an MvxExpandableListView, but apparently using the code below makes the group unable to expand a group anymore (if I delete the code below, the list works just fine; if I keep it, clicking the group won't expand it)

public IMvxCommand SelectGroupCommand => new MvxCommand<DrinkViewModel>(SelectGroup);
public void SelectGroup(DrinkViewModel drink)
{

}

My layout:

<Mvx.MvxExpandableListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:id="@+id/DrinksExpandableListView"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:groupIndicator="@null"
android:childDivider="@android:color/transparent"
local:MvxBind="ItemsSource Drinks; ItemClick SelectDrinkCommand; GroupClick 
SelectCategoryCommand"
local:MvxItemTemplate="@layout/drinks_listitem"
local:MvxGroupItemTemplate="@layout/drinks_listheader"/`
android needs-investigation bug

Most helpful comment

Might have something to do with our GroupOnClick does not set GroupClickEventArgs.Handled explicitly. Needs a bit of investigation.

>All comments

Might have something to do with our GroupOnClick does not set GroupClickEventArgs.Handled explicitly. Needs a bit of investigation.

Was this page helpful?
0 / 5 - 0 ratings