sunnytheshine
sunnytheshine

Reputation: 143

Asynchronous loading image from web to gridview in Android

GridView

I want to load images Asynchronously from web to my Gridview in place of bubdub image without blocking the UI.

I want the app icons get loaded from web.

Upvotes: 1

Views: 178

Answers (2)

Jivraj S Shekhawat
Jivraj S Shekhawat

Reputation: 352

add picasso library to your project and add this code to your Adapter's Getview method where you are trying to add set ImageResource.

Picasso.with(context)
       .load(imageUrl_some_static_link)
       .placeholder(R.drawable.image_name_in_your_case_bubdub).into(your_imageview)

Hope this helps cheers

Upvotes: 1

Moubeen Farooq Khan
Moubeen Farooq Khan

Reputation: 2885

you can use picaso library for that

use

write below line in your adapter

Picasso.with(context).load("Your web Utl").into(imageView);

this will not block ur ui

have a look at that http://square.github.io/picasso/

Upvotes: 2

Related Questions