xamarinxamarin.androidmvvmcrossmvxbind

Image is not loaded from URL to Mvx.MvxImageView


I'm making a GridView that's suppose to view images with text. The images are taken from url's and my problem is that they're not loaded.

Inside a grid item template I have this element:

<Mvx.MvxImageView
    android:id="@+id/gridItemImage"
    android:layout_width="fill_parent"
    android:layout_height="25dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:scaleType="fitXY"
    local:MvxBind="ImageUrl Image" />

The property that ImageUrl is bound too looks like this:

public string Image
{
    get
    {
        return @"http://some.image/on/the/Internet.png";
    }
}

It actually calls a private field, but I've written the test value I'm setting.

My question is: What should I do to properly bind ImageUrl and get it to show in the grid?


Solution

  • What Plugins do you have installed?

    Have you installed DownloadCache, File and JSON plugins on both the Core and Droid project?

    Update

    To properly bind to the ImageUrl of a MvxImageView you have to: have the Mvvmcross DownloadCache, File and JSON plugins on both the Core and Droid project.

    These are the plugins you need: enter image description here