Android Picasso Image does not load

后端 未结 16 1825
醉梦人生
醉梦人生 2020-12-10 04:02

There are two situations I load images, first, just directly from the internet, and second, load images that are downloaded in the device. And whenever I load, 8~9 out of 10

16条回答
  •  生来不讨喜
    2020-12-10 04:34

    Use link below

    Picasso.Get().Load(imageUri).Placeholder(Resource.Drawable.patient_profile_pic).Resize(100, 100).Into(imgProflle);
    

    Xamarin or .Net

     byte[] imageBytes;
    
    
        using (var webClient = new WebClient())
        {
          imageBytes = webClient.DownloadData(imageUri);
        }
    
        Bitmap bitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length);
    
        imgProflle.SetImageBitmap(bitmap);
    

提交回复
热议问题