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 8914519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:44:30+00:00 2026-06-15T04:44:30+00:00

hi i am trying to display image obtained from url (using jsoup) in a

  • 0

hi i am trying to display image obtained from url (using jsoup) in a grid view. it manages to retrieve the number of images i am going to load but doesn’t display the actual image itself. the actual images are not musical note

this is the screenshot:

enter image description here

this are codes for me to obtain the url and display it, i used “lazy gallery”:

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gallery);


        this.setRequestedOrientation(
                ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        Button refresh = (Button)findViewById(R.id.btn_refresh);
        refresh.setOnClickListener(this);

        ImageButton home = (ImageButton)findViewById(R.id.btn_home);
        home.setOnClickListener(this);

        // Loading products in Background Thread
        new LoadThumbnails().execute();

        //Getting adapter and parse in results      
        list=(GridView)findViewById(R.id.list);
        adapter=new LazyAdapter(this, htmlList);        
        list.setAdapter(adapter);

        // Click event for single list row
        list.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {        

                Intent intent = new Intent();
                intent.setClassName("com.scba", "com.scba.gallery.EnlargedImage");
                intent.putExtra("item", actualImage);
                startActivityForResult(intent, GET_INTENT_CODE);

                }
        }); 
    }

       /**
     * Background Async Task to Load all product by making HTTP Request
     * */
    class LoadThumbnails extends AsyncTask<String, String, String> {

        /**
         * Before starting background thread Show Progress Dialog
         * */
         @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pDialog = new ProgressDialog(PhotoGallery.this);
            pDialog.setMessage("Loading" + "\n" + "Please wait...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(false);
            pDialog.show();
        } 

        /**
         * getting All products from url
         * */
        protected String doInBackground(String... args) {
            try {


                Document doc = Jsoup.connect("http://www.s-cba.org.sg/events/2011/photo111001_en.shtml").get();
                //Elements trs = doc.select("td.text tr td");
                //remove header row


                /* for (int i = 0; i < 43; i++)
                    {
                    Element link = doc.select("td.text tr td a").get(i);
                    String relHref = link.attr("href");
                    //System.out.println("Blog: " + relHref);
                    } */

                    for (int c = 0; c < 43; c++)
                    {
                    Element link = doc.select("td.text tr td a img").get(c);
                    String url = link.absUrl("src");
                    System.out.println("Blog: " + url);


                    HashMap<String, String> map = new HashMap<String, String>();

                     // adding each child node to HashMap key => value
                    map.put("photo",url); 

                    // adding HashList to ArrayList
                    htmlList.add(map); 

                    //System.out.println(htmlList);
                    }

            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }


    /**
     * After completing background task Dismiss the progress dialog
     * **/
    protected void onPostExecute(String file_url) {
        // dismiss the dialog after getting all products
        pDialog.dismiss();
        adapter.notifyDataSetChanged();
    }
    }


    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        if (v.getId() == R.id.btn_refresh)
        {
            photosList.clear();
            // Loading products in Background Thread
            new LoadThumbnails().execute();
        }
        else if(v.getId() == R.id.btn_home)
        {

            Intent intent = new Intent();
            intent.setClassName("com.scba", "com.scba.Menu");
            finish();

        }

    }
}

this is the logcat output:

11-29 02:39:13.991: D/dalvikvm(167): GC_CONCURRENT freed 384K, 6% free 9533K/10119K, paused 20ms+5ms
11-29 02:39:16.392: I/ActivityManager(91): START {cmp=com.scba/.admin.Settings} from pid 777
11-29 02:39:16.400: W/WindowManager(91): Failure taking screenshot for (180x300) to layer 21010
11-29 02:39:16.500: V/PhoneStatusBar(143): setLightsOn(true)
11-29 02:39:16.631: I/ActivityManager(91): Displayed com.scba/.admin.Settings: +214ms
11-29 02:39:21.730: W/WindowManager(91): Failure taking screenshot for (180x300) to layer 21015
11-29 02:39:21.780: V/PhoneStatusBar(143): setLightsOn(true)
11-29 02:39:24.169: I/ActivityManager(91): START {cmp=com.scba/.gallery.PhotoGallery} from pid 777
11-29 02:39:24.189: W/WindowManager(91): Failure taking screenshot for (180x300) to layer 21010
11-29 02:39:24.319: V/PhoneStatusBar(143): setLightsOn(true)
11-29 02:39:24.719: I/Process(91): Sending signal. PID: 777 SIG: 3
11-29 02:39:24.719: I/dalvikvm(777): threadid=3: reacting to signal 3
11-29 02:39:24.949: I/dalvikvm(777): Wrote stack traces to '/data/anr/traces.txt'
11-29 02:39:25.119: D/dalvikvm(777): GC_FOR_ALLOC freed 1225K, 15% free 11137K/13063K, paused 98ms
11-29 02:39:25.209: I/ActivityManager(91): Displayed com.scba/.gallery.PhotoGallery: +1s9ms
11-29 02:39:26.569: D/dalvikvm(777): GC_CONCURRENT freed 781K, 17% free 10941K/13063K, paused 20ms+22ms
11-29 02:39:27.449: D/dalvikvm(777): GC_CONCURRENT freed 408K, 15% free 11106K/13063K, paused 21ms+9ms
11-29 02:39:27.769: I/dalvikvm(777): Total arena pages for JIT: 12
11-29 02:39:28.519: D/dalvikvm(777): GC_CONCURRENT freed 474K, 15% free 11226K/13063K, paused 21ms+53ms
11-29 02:39:28.639: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7278_s.jpg
11-29 02:39:28.659: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7300_s.jpg
11-29 02:39:28.709: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7302_s.jpg
11-29 02:39:28.729: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7326_s.jpg
11-29 02:39:28.739: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7335_s.jpg
11-29 02:39:28.759: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7363_s.jpg
11-29 02:39:28.809: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7400_s.jpg
11-29 02:39:28.829: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7411_s.jpg
11-29 02:39:28.839: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7418_s.jpg
11-29 02:39:28.859: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7424_s.jpg
11-29 02:39:28.869: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7610_s.jpg
11-29 02:39:28.919: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7647_s.jpg
11-29 02:39:28.941: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7657_s.jpg
11-29 02:39:28.959: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7672_s.jpg
11-29 02:39:28.969: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7734_s.jpg
11-29 02:39:29.039: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7767_s.jpg
11-29 02:39:29.059: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_7816_s.jpg
11-29 02:39:29.069: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8219_s.jpg
11-29 02:39:29.150: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8235_s.jpg
11-29 02:39:29.159: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8243_s.jpg
11-29 02:39:29.209: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8259_s.jpg
11-29 02:39:29.229: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8327_s.jpg
11-29 02:39:29.239: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8356_s.jpg
11-29 02:39:29.259: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8375_s.jpg
11-29 02:39:29.269: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8399_s.jpg
11-29 02:39:29.320: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8401_s.jpg
11-29 02:39:29.349: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8417_s.jpg
11-29 02:39:29.359: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8419_s.jpg
11-29 02:39:29.379: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8448_s.jpg
11-29 02:39:29.429: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8469_s.jpg
11-29 02:39:29.469: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8470_s.jpg
11-29 02:39:29.480: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8527_s.jpg
11-29 02:39:29.529: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8562_s.jpg
11-29 02:39:29.549: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8594_s.jpg
11-29 02:39:29.589: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8664_s.jpg
11-29 02:39:29.639: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8688_s.jpg
11-29 02:39:29.659: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8722_s.jpg
11-29 02:39:29.680: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8752_s.jpg
11-29 02:39:29.689: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8763_s.jpg
11-29 02:39:29.730: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8869_s.jpg
11-29 02:39:29.759: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8896_s.jpg
11-29 02:39:29.789: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/DSC_8939_s.jpg
11-29 02:39:29.799: I/System.out(777): Blog: http://www.s-cba.org.sg/events/2011/111001/IMG_5276_s.jpg
  • 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-06-15T04:44:32+00:00Added an answer on June 15, 2026 at 4:44 am

    Please Write below code line into your adapter’s getView() method.

    imageLoader.DisplayImage(song.get("photo"), thumb_image);
    

    instead of

    imageLoader.DisplayImage(song.get(MainActivity.TAG_THUMBNAIL), thumb_image);
    

    it will solve your problem.

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

Sidebar

Related Questions

i am trying to display an image from net..and i am using ignition library
I'm trying to display an image from a URL in a UIImageView and I'm
I'm trying to display the biggest image url returned from an xml result. So
I am trying to display an image from the /webroot/img/ folder using the following
I'm trying to display an image file from a directory using a PHP echo
I'm trying to display an image from a webcam in my app using HJCache
I have been trying to display image from database using php but i am
I am trying to display an image from a URL, which may be larger
I'm trying to display image data read in from a binary file (I have
friends, i am trying to display image from gallery now i want to put

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.