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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:39:25+00:00 2026-05-13T05:39:25+00:00

I am using listview to display data, inside listview i am using image in

  • 0

I am using listview to display data, inside listview i am using image in every listeitem.

following method is called from wrapper class

public View getView(int position, View convertView,
    ViewGroup parent) {  /*implementation*/ }

I am following this tutorial http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/List4.html

class DownloadImage extends AsyncTask<ImageView, Void, Drawable>{
        private ImageView iv;

        @Override
        protected Drawable doInBackground(ImageView... params) {
            iv = params[0];
            return Util.getImageFromURL(imageURL); 
        }

        @Override
        protected void onPostExecute( Drawable d ) {
            iv.setImageDrawable(d);
        }

}
new DownloadImage().execute(getImageIcon());

getImageIcon contains the reference of the inflater layout’s imageview.

Now problem is first when 2nd listeitem image gets loaded it also resplaces the first listeitem image and so on…

i think it is listitem’s referencing issue but above code should work b/c i am passing imageview reference inside.

  • 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-13T05:39:25+00:00Added an answer on May 13, 2026 at 5:39 am

    This blog post may provide some guidance on using images with ListViews.


    EDIT: Since @Hunt has pointed out the above link is dead, here’s a great one that is in the official Android developer docs:

    • Android Training → Displaying Bitmaps Efficiently → Displaying Bitmaps in Your UI → Load Bitmaps into a GridView Implementation
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using listview to display data, inside listview i am using image in
I'm using the Listview to display my data. On the ItemDatabound event I want
When using an ASP.NET WebForms ListView control to display data in an HTML table
i want to display some information in a listview using the GridView. i have
I am using the ListView Control with the following datasource List<MyObject> On my listview
I'm using linqdatasource for displaying data in listview (nested because of grouping) control. I
I'm using the ListView control (ASP.NET 2008) to show a bunch of lines of
I'm using a ListView in C# to make a grid. I would like to
Currently I have a ListView (using the Details View). I would like to implement
I have a case that keeps coming up where I'm using a ListView or

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.