1
votes

I have a list view which binds to an array of strings as such:

<Mvx.MvxListView
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   local:MvxBind="ItemsSource StringArray"
   local:MvxItemTemplate="@layout/listitem_view" />

My item template is simply just a text view...

<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"

which bound fine using JSON...

    local:MvxBind="{'Text':{'Text':''}}" />

and again using Swiss...

    local:MvxBind="Text " />

but after updating Mvx to 3.10 I'm now not getting anything bound to my text view even though the list is still bound to the list view. Has the syntax in Rio binding changed the default behaviour?

1

1 Answers

1
votes

There was no intended change to this area in 3.0.10 - although there was a fix for this Error when making bind ObservableCollection<string> for a MvxListView - fix was https://github.com/slodge/MvvmCross/commit/d325fb75eaeeb8e470e0ac551f2b69b441f7b285. I believe this was released and worked in 3.0.10 for a test app.

Has the syntax in Rio binding changed the default behaviour?

I don't know if anyone has seen any issues with these in MethodBinding or FieldBinding as part of the Rio extensions. I've not heard of any.


If this is broken - and depending on whether this is broken due to the binding engine (Tibet) or the Method and Field extensions (Rio) or something else, then possible workarounds include:

  • switching away from Rio
  • using the period "." alternative to empty space - e.g. local:MvxBind="Text ."
  • adding a public object HackSelf { get { return this; } property to the bound object and binding to that local:MvxBind="Text HackSelf"
  • overriding the registered binding engine (e.g. back to Swiss)

If this is broken - it might also be a good idea to log an issue on github for this - including modules loaded, use case, version used, any suspicious trace output seen and a link back here.