Sagar Zala
Sagar Zala

Reputation: 5134

Load images from json url and show in gridview in android

I have created one application.

In that i gets some urls from JSON string and i want to load images from these urls and show in grid-view.

My code is:

ListAdapter adapter = new SimpleAdapter(Screen_Shot.this, screenshotList,
                    R.layout.screen_shot_item, new String[] { "url", "time" }, 
                    new int[] { R.id.imageView_screen_shot, R.id.textView_screen_shot});
            gridView.setAdapter(adapter);

The problem is it shows only time of image captured but not image. Below is my screenshot.

The problem is it shows only time of image captured but not image.

Upvotes: 0

Views: 2407

Answers (1)

joselufo
joselufo

Reputation: 3415

Use this library for load dynamically from url one Image.

Example:

ImageView img = (ImageView) findViewById(R.id.yourImage); Picasso.with(context).load("YouURL.com").into(img);

Upvotes: 2

Related Questions