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

  • Home
  • SEARCH
  • 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 6088833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:01:54+00:00 2026-05-23T12:01:54+00:00

I am working on an Android app with a listView and am in the

  • 0

I am working on an Android app with a listView and am in the process of optimizing it. It uses a custom cursor adapter in one activity and I noticed that bindview() was firing twice for each row of the list. While researching the BindView() and NewView() methods here, I read in a post that having Wrap_Content for the width of my listview was a bad idea. I switched it to Fill_Parent and viola now bindview() and newview() each only fire once for each item.

So that I can better understand the internals of the Andorid OS, I would like to know why Wrap_Content caused bindview() to fire multiple times.

I have done several searches on Google, the android developer docs and here with no luck.

Any response is really appreciated.

Thanks,
George

  • 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-23T12:01:55+00:00Added an answer on May 23, 2026 at 12:01 pm

    If I recall correctly from a video from Google I/O, setting the width (or height) of a ListView to wrap_content will cause it to measure the first 3 items and base its dimensions off of those. In order to measure those first 3 items, it must call bindView() to populate them. Once it has measured, it will populate fully and call bindView() again on those first 3 and any subsequent.

    This is due to the fact that the ListView only keeps in memory what is on the screen when you may have potentially an infinite number of items in the list. It is not designed to wrap_content to your largest item because it could be stuck in the drawing phase forever.

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

Sidebar

Related Questions

I am working on an android app that has a database in which one
I am working on an Android app that utilizes the Google Maps API MapView,
I am working on one android app. I want to connect my local PC
I'm writing an Android app that is basically a ListView populated with an array
I have a activity that fills a ListView, and it is working. Because I
I have an Android app with a listview that updates the listview when the
I am currently working on my first android app. In a listview, I need
I have an android app that displays a list of items in a Custom
OK, I am working on an App that has a page with a listview
Working on an Android app with FB 4.6, I would like to have the

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.