I am trying to display image from the path. I can display the image if i move the image to drawable but i want to display am image from he image Path. I tried using imageBitMap with GetImageBitmapFromUrl("image path") but it only display a blank screen. The seconded way i tried is Android.Net.Uri url = Android.Net.Uri.Parse( "the image path")
namespace SetPictureUrl
[Activity(Label = "SetPictureUrl", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);`{
ImageView imagen = FindViewById<ImageView>(Resource.Id.demoImageView);
//------------------ i tried but did not work. the screen is blank
// var imageBitmap = GetImageBitmapFromUrl("my image path");
// imagen.SetImageBitmap(imageBitmap);
//---------------- i tried but did not work. the screen is blank
Android.Net.Uri url = Android.Net.Uri.Parse("./HTC Desire 620/Internal storage/storage/emulated/0/test/fox.jpeg");
imagen.SetImageURI(url);
//----- this work but is not the way i wish to do it. my main program work with file paths
// imagen.SetImageResource(Resource.Drawable.fox);
}
i tried calling the path in view way but does not seem to make a difference example:
(./HTC Desire 620/Internal storage/storage/emulated/0/test/fox.jpeg)
,(HTC Desire 620/Internal storage/storage/emulated/0/test/fox.jpeg)
and (¬/HTC Desire 620/Internal storage/storage/emulated/0/test/fox.jpeg)
but no joy. I would love any help. Unsure why this giving me so much issue/
Could you try this ?