5

Xamarin.Android と mvvmcross を使用して、Android のリストビューに Web イメージをバインドしようとしています。私はこのエラーが発生しています。

MvxBind:エラー: 7.13 ビューの種類が見つかりません - Mvx.MvxHttpImageView Android.Views.InflateException: バイナリ XML ファイルの行 #1: クラス Mvx.MvxHttpImageView の膨張エラー

これは私のaxmlです...

<?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>

4

1 に答える 1

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 を使用する前に、イメージ ヘルパーを提供する必要があります」

于 2013-04-30T05:10:59.307 に答える