JDibble JDibble - 28 days ago 6
Android Question

MvvmCross binding image file to Android ImageView

I am trying to bind an image file to an Android ImageView that is within an MvxListView. The images are just not appearing when the View is shown.

I have included the

MvvmCross.HotTuna.Plugin.File
package.

ListVideo.axml (snippet)

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@android:color/holo_blue_bright"
local:MvxBind="ImageUrl Thumbnail" />


The typical value for Thumbnail is

VideoData/2015-07-24-09-26-16/2fea9249-9370-4542-927a-c856e678f7b1.jpg


The value of
Context.FilesDir.Path
is
/data/data/com.app.AppName/files


The image file
/data/data/com.app.AppName/files/VideoData/2015-07-24-09-26-16/2fea9249-9370-4542-927a-c856e678f7b1.jpg
does exist

I understand that to bind an image some custom folder determined within your app, I need to provide a path relative to
Context.FilesDir.Path
in order for the plugin to load it. I believe that the string in Thumbnail is correct.

But nothing is displayed in the ImageView. I have been banging my head against this one all morning. Any suggestions?

Edit :

I have managed to solve the problem !!

I needed the
MvvmCross.HotTuna.Plugin.DownloadCache
as well as the
MvvmCross.HotTuna.Plugin.File
package.

Answer Source

I have managed to solve the problem !!

I needed the MvvmCross.HotTuna.Plugin.DownloadCache as well as the MvvmCross.HotTuna.Plugin.File package.