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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:27:51+00:00 2026-06-04T05:27:51+00:00

I am implementing List view in my Activity. I am showing image in first

  • 0

I am implementing List view in my Activity. I am showing image in first row only. when I moves from that Activity to another Activity and press Back then this image is shown in all Row? what to do? any help will be Appreciated. Code is this. I am Retrieving image from Remote server.
if (convertView == null) {

        LayoutInflater inflater = (LayoutInflater) mContext
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        convertView = inflater.inflate(R.layout.shop_list_items_row, null);
        viewHandler = new ListingViewHandler(convertView);
        convertView.setTag(viewHandler);
        convertView
                .setBackgroundResource((position % 2) == 0 ? R.color.listViewAlternateColor1
                        : R.color.listViewAlternateColor2);
    }

    viewHandler = (ListingViewHandler) convertView.getTag();

    ImageView image = viewHandler.getImage();
     Bitmap a = downloadFile(imageUrl);

    if (position==0) {
        image.setImageBitmap(a);
    }
  • 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-04T05:27:53+00:00Added an answer on June 4, 2026 at 5:27 am

    This is normal behaviour of ListView Adapter, it is because, ListView re-uses View as converView for row. So the View for position 0 is re-used, which is holding the image, so You have to remove that image for other postions, to do so, put an else condition also, to remove image for other positions, like this:

    if (position==0) {
       image.setImageBitmap(a);
    }
    else
       image.setImageDrawable(null);  //to remove the image for all other rows
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder, if I can inject a list of (stateless) beans, that all implementing
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
Implementing Document-View pattern I faced the problem: standard generic collections and dictionaries ( List<T>
I'm implementing n-layer PreferenceActivities 1st layer PreferenceActivity is loaded from preference-headers. First header creates
I'm implementing a Model View Control program. I have a class User that has
i have this customized list. each row contains an image and two lines of
I have some problems in implementing a list view with 3 items, one text,
I am implementing Expandable List view in android and i am getting the above
I posted earlier about implementing a list view in android, which I managed to
I am implementing a function to recursively reverse a linked-list, but getting seg-fault. typedef

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.