1

Im trying to load an image from a website into image view but nothing is loading. Im fairly new to android so i'm probably missing something simple/stupid a step or something but I need a little help here. Note photo[position] = www.mydomain.com/photo.png (http:// is included i just can't enter it here apparently)

// Locate the ImageView
        imgphoto = (ImageView) itemView.findViewById(R.id.photos);
        // Capture position and set to the ImageView

        Bitmap bMap = BitmapFactory.decodeFile(photo[position]);
        imgphoto.setImageBitmap(bMap);
user520300
  • 1,497
  • 5
  • 24
  • 46

1 Answers1

0

Just use Picasso. This library will do loading for you.

Picasso.with(context).load("http://www.yourdomain.com/photo.png").into(imageView);
agamov
  • 4,407
  • 1
  • 27
  • 31