Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7535691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:22:08+00:00 2026-05-30T06:22:08+00:00

I have successfully parsed my json images and displayed the response as image ,however

  • 0

I have successfully parsed my json images and displayed the response as image ,however I can only display one image at a time.

enter image description here

How can I display these images as listview using this code.

Before posting this question I have also looking to this solution. I want to display these images as listview along with my other json values using using the below code.

protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

    JSONParser prop = new JSONParser();
    JSONObject json = prop.getJSONFromUrl(url);
    try{
    properties = json.getJSONArray(TAG_PROPERTY);
    for (int i = 0; i < properties.length(); i++) {
        JSONObject c = properties.getJSONObject(i);
        String photoThumbnailUrl = c.getString(TAG_PHOTOS);             

    // load image view control
    imgView = (ImageView) findViewById(R.id.imgView);

    // grab image to display
    try {
        imgView.setImageDrawable(grabImageFromUrl(photoThumbnailUrl));


    } catch (Exception e) {
        txtUrl.setText("Error: image not grabed");
    }
   }
    }catch (Exception ex) {
    txtUrl.setText("Error: Properties not recieved");
    }
}
private Drawable grabImageFromUrl(String photoThumbnailUrl) {
    System.out.println(photoThumbnailUrl);
    // TODO Auto-generated method stub
    return null;
}
//from here only one image is displayed....
//start the listview here

    public View getView(int position, View convertView, ViewGroup parent) {
        System.out.println("ok");
        // TODO Auto-generated method stub
        ViewHolder holder;
        if (convertView == null) {
            //convertView = inflater.inflate(R.layout.list_items, null);
            holder = new ViewHolder();
            holder.identifier= (TextView) convertView
                    .findViewById(R.id.identifier);
            holder.price = (TextView) convertView.findViewById(R.id.price);
            holder.address = (TextView) convertView.findViewById(R.id.address);
            holder.photoThumbnailUrl = (ImageView) convertView
                    .findViewById(R.id.imgView);
            convertView.setTag(holder);
            System.out.println("identifier");
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        return convertView;
}
    class ViewHolder{
        public TextView identifier;
        public TextView price;
        public TextView address;
        public ImageView photoThumbnailUrl;

    }
    }

Many thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:22:09+00:00Added an answer on May 30, 2026 at 6:22 am

    I think you should create a custom listview item with XML and use a SimpleAdapter to fill each row with the JSON items. A while back is used this article to help me out, I hope it helps you as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using json.NET successfully in projects for some time now without any
I have successfully made contact with the internet and parsed a few documents via
I have a web service class that successfully pulls my JSON from a feed
I have an asp.net WebMethod that returns an XmlDocument object. I can successfully call
I have an asp.net MVC app. One of the forms posts json data to
I have a simple html file. It access url1 and successfully parse the json
So I have this JSON struture that I have successfully passed into JS: {
I currently have the code below which successfully sets a random image from an
I have a custom listview, i successfully parse the data into a list but
I have an atomfeed with which is succesfully getting parsed. All the articles are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.