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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:09:20+00:00 2026-06-01T05:09:20+00:00

I’m attempting to display a listview that includes an image previously downloaded from the

  • 0

I’m attempting to display a listview that includes an image previously downloaded from the internet, as well as some information. The text information is showing up great, but the imageview is not. My code is:

@Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Log.w("MyApp", "Getting View");

         View row = convertView;

         if(row==null){
              LayoutInflater inflater=getLayoutInflater();
              row=inflater.inflate(R.layout.list_item, parent, false);
         }

         ImageView showcase = null;

         try{
             showcase = new ImageView(ReadingList.this);
         }catch(Exception e){
             Log.w("MyApp", e.toString());
         }

         if(showcase!=null){
             BitmapFactory.Options options = new BitmapFactory.Options();
             options.inSampleSize = 3;

             Bitmap bm = null;

             File dir = new File(PATH + urlIDs[position]);

             if(dir.isDirectory()){
                 Log.w("MyApp","Dir is a directory");
                 for (File child : dir.listFiles()) {
                        String path = child.getAbsolutePath();
                        Log.w("MyApp", path);
                        bm = BitmapFactory.decodeFile(path, options);
                        Log.w("MyApp", "See if bm is null");
                        if(bm!=null){
                            Log.w("MyApp", "bm!=null");
                            showcase.setImageBitmap(bm);
                            break;
                        }
                      }
             }

         }

         TextView title =(TextView)row.findViewById(R.id.list_item_text);
         TextView url = (TextView) row.findViewById(R.id.list_item_url);
         title.setText(Titles[position]);
         url.setText(urlPrefixes[position]);

         return row;
    }
}

Sorry it’s a little messy at the moment.. I can see in the logcat as it finds an image in that folder, it passes the bm!=null check, and should be setting that image as the content of the imageView if I’m not mistaken. I can even see in the logcat that it’s moved on to the next row item, and I can use the eclipse file manager to see that there is in fact an image at the end of the path received by child.getAbsolutePath

What am I doing wrong?

  • 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-01T05:09:22+00:00Added an answer on June 1, 2026 at 5:09 am

    What am I doing wrong?

    ImageView showcase is not connected to the list item view. You should find that view within the list item view instead, smth like:

    ImageView showcase = (ImageView) row.findViewById(R.id.my_icon);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.