Reputation: 31
i am new in android. I need to load multiple images from the URL
to a viewpager
by using lazyloading
images are not from the drawable
These are my urls:
String[] imagUrl={
"http://img6a.flixcart.com/image/shoe/b/v/g/black-coaster-globalite-10-200x200-imadw577jjh5fsry.jpeg",
"http://img6a.flixcart.com/image/shoe/b/v/g/black-coaster-globalite-10-200x200-imadw577shaeghnn.jpeg",
};
Upvotes: 3
Views: 2764
Reputation: 16976
Also, there is a good Library Called:(picasso
) you can use it.
Here is the tutorial:
http://javatechig.com/android/how-to-use-picasso-library-in-android
And for codes:
//Initialize ImageView
ImageView imageView = (ImageView) findViewById(R.id.imageView);
ImageView imageView = (ImageView) findViewById(R.id.imageView2);
//Loading image from below url into imageView
Picasso.with(this)
.load("YOUR IMAGE URL HERE")
.into(imageView);
Picasso.with(this)
.load("Your second image url")
.into(imageView2);
With the best results, you can this.
Upvotes: 0