How to display images from URL on Android

Viewed 38

I can display one image with glide but my images more one I want display images online in android_recyclerView

2 Answers

You can use Picasso library for the same.

Permission in android manifest

<uses-permission android:name="android.permission.INTERNET" />

Add Picasso in app level build.gradle

implementation 'com.squareup.picasso:picasso:2.71828'

Loading image

Picasso.get().load(model.getTrack().getAlbum().getImages().get(position).getUrl()).into(holder.songCover);

The best library for load images for me is Glide https://github.com/bumptech/glide

After you add the dependency to your grade file, you just need to do something like this:

Glide.with(this).load("URL_OF_YOUR_IMAGE").into(imageView);
Related