MvvmCross MvxHttpImageView错误

Rob*_*ens 5 xamarin.android mvvmcross

我正在尝试使用Xamarin.Android和mvvmcross在Android上的listview中绑定Web图像.我收到这个错误了.

MvxBind:错误:7.13未找到视图类型 - Mvx.MvxHttpImageView Android.Views.InflateException:二进制XML文件行#1:错误膨胀类Mvx.MvxHttpImageView

这是我的斧头......

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res/com.mynamespace.android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

<LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

    <Mvx.MvxHttpImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/iconeView"
                    local:MvxBind="{'HttpImageUrl':{'Path':'imageUrl'}}" />
    <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textSize="30dp"
            local:MvxBind="Text name" />
    <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textSize="10dp"
            local:MvxBind="Text tagline" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

Stu*_*art 10

如果您使用的是v3,请尝试

  • MvxImageView 代替 MvxHttpImageView
  • ImageUrl 代替 HttpImageUrl

绑定视图位于https://github.com/slodge/MvvmCross/tree/v3/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views

我认为MvxImageView也在以下讨论:http://slodge.blogspot.co.uk/2013/04/n2-lists-and-kittens-n1-days-of.html

您还需要包含MvvmCross文件和DownloadCache插件,否则您将收到此错误

"没有注册IMvxImageHelper - 在使用MvxImageView之前必须提供图像助手"