Setar
Setar

Reputation: 136

FFimageLoading NugetPackage for Xamarin MVVMCross 4.4.0

As stated in this question I need to load an image from URL using Xamarin.Forms with MVVMCross 4.4.0.

I was directed to use the FFimageLoading package in that question but it is not working, after searching I found that the FFimageLoading library has this axml tag:

<ffimageloading.cross.MvxImageLoadingView/>

I have a MvxListView and in each ListItem I need to show an image from URL, but there's no way as Xamarin.forms and Mvx.MvximageView ImageUrl are using different versions of the same dependency.

I have a Model class with String imgUrl, a viewModel with a observableCollection<myclass> items which has the imgUrl ( items.imgUrl ) but when I try to bind in axml it is not working.

<ffimageloading.cross.MvxImageLoadingView
            android:layout_width="100dp"
        android:layout_height="100dp"
            local:MvxBind="Source imgUrl" />

Upvotes: 0

Views: 380

Answers (2)

Setar
Setar

Reputation: 136

Dont use xamarin.forms with mvvmcross4.4.0 at 02/12/2016.

xamarin forms has dependencies to old versions off android.support.appcompat.v4/v7 so i cant use the Mvx.MvxImageView to show images from Url, and implementing a navigation menu is so hard.

this is my conclusion about this issue i created. I'm going to remove xamarin forms of my solution.

Upvotes: 0

Joehl
Joehl

Reputation: 3701

First of all: You are using Xamarin.Forms but you are also talking about a axml-view in your android project. I know, sometimes there is no other way, but try to keep your UI together in your shared/pcl project (because it's one of the main cases of using Xamarin.Forms).

I never worked with the MvvmCross view of the plugin (MvxImageLoadingView), but I think you should use a an UriImageSource as type of your imgUrl property instead of just a string (looking at this page in the documentation).

Upvotes: 1

Related Questions