Search code examples
c#xamarinmvvmcross

Missing stylable field MvxExpandableListView_GroupItemTemplate


I've noticed the following MvxBind info message being output to logcat while debugging on Android:

Missing stylable field MvxExpandableListView_GroupItemTemplate

I've tried adding the MvxBindingAttributes.xml file from GitHub to the DroidProject\Resources\values folder and set the Build Action to AndroidResource. This causes a compiler error for each <declare-stylable> XML tag like:

Attribute "XXX" has already been defined

It's interesting because it claims MvxGroupItemTemplate is already defined when I compile, yet when I run the program a message is displayed saying it's missing.

What should I do to fix this?


Solution

  • I had the same problem this morning when updating to the latest version of Xamarin Studio. Fixed it for now by including this:

    <?xml version="1.0" encoding="utf-8" ?>
    <resources>
      <declare-styleable name="MvxExpandableListView">
        <attr name="GroupItemTemplate" format="reference"/>
      </declare-styleable>
    </resources>
    

    In the Resources\values\attrs.xml file.