Bonjour à tous

J'ai une MvxListView dans une application Xamarin.Android, avec comme ItemTemplate un layout devant afficher un nom et une image, récupéré via un WS. Le nom s'affiche correctement, mais ce n'est pas le cas de l'image.

View_Main.axml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#00007f"
    android:textColor="#ffffff"
    android:textSize="24dp"
    android:layout_margin="30dp"
    android:padding="20dp"
    android:gravity="center"
    android:layout_marginTop="10dp">
  <Mvx.MvxListView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        local:MvxBind="ItemsSource ItemsModels"
        local:MvxItemTemplate="@layout/item_list" />
</LinearLayout>
item_list.axml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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-auto"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:orientation="horizontal">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:textSize="22dp"
        local:MvxBind="Text Name" />
    <Mvx.MvxImageView
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_alignParentRight="true"
        android:layout_marginRight="10dp"
        local:MvxBind="ImageUrl Image" />
</LinearLayout>

J'ai ajouté la permission d'accès à Internet dans l'AndroidManifest, et j'ai installé les plugins DownloadCache et File.

J'ai vérifié les urls récupérées, elles sont toutes correctes.

J'ai suivi une vidéo d'un tuto d'Olivier Dahan que l'on peut visionner là



Dans son cas, ça marche très bien. Maintenant, il utilise la version 3 de MvvmCross, alors que j'utilise la 4.0 sortie récemment !

Merci d'avance pour votre aide