2013-04-30 7 views
5

मैं Xamarin.Android और mvvmcross का उपयोग करके एंड्रॉइड पर एक सूची दृश्य में एक वेब छवि को बांधने की कोशिश कर रहा हूं। मुझे हालांकि यह त्रुटि मिल रही है।MvvmCross MvxHttpImageView त्रुटि

MvxBind: त्रुटि: 7.13 दृश्य प्रकार नहीं मिला - Mvx.MvxHttpImageView Android.Views.InflateException: बाइनरी एक्सएमएल फ़ाइल लाइन # 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> 

उत्तर

10

आप v3 का उपयोग कर रहे हैं, तो कोशिश

  • MvxHttpImageView
  • बजाय ImageUrlHttpImageUrl

बाध्य विचार हैं https://github.com/slodge/MvvmCross/tree/v3/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views

में मुझे लगता है कि MvxImageView भी चर्चा की है के बजाय MvxImageView: http://slodge.blogspot.co.uk/2013/04/n2-lists-and-kittens-n1-days-of.html

तुम भी MvvmCross फ़ाइल शामिल करने के लिए की जरूरत है और DownloadCache प्लगइन्स, या अन्यथा आपको यह त्रुटि मिल जाएगी

"No IMvxImageHelper registered - you must provide an image helper before you can use a MvxImageView"

+1

पुराना जेसन सिंटैक्स भी v3 में डिफ़ॉल्ट रूप से अक्षम है - इसलिए यह वाक्यविन्यास स्थानीय काम नहीं करेगा: MvxBind = "{'HttpImageUrl': {'पथ': 'imageUrl'}}" – Stuart

संबंधित मुद्दे