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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:45:12+00:00 2026-06-09T08:45:12+00:00

I have read several times android documentation about the GetView DataAdapter class. From what

  • 0

I have read several times android documentation about the GetView DataAdapter class. From what I understand, if I have a homogeneus list where every item is just a textview and all items fall inside the screen (no scroll is possible) there won’t be any view recycling and so I should receive 4 calls to the GetView with convertView being null. Well, this is not what happens to me. First time convertView is null, but it is the same for the others 3 created items. List is populated correctly but I would like to understand why is this happening. If anyone could help I would be really greateful.

  • 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-09T08:45:13+00:00Added an answer on June 9, 2026 at 8:45 am

    I believe Android always tries to recycle views because that will make population fastest. It doesn’t matter if all the views fit into the visible viewport of the list. Inflation/creation of views is very expensive, and that’s why Android wants to recycle as much as possible.

    You are guaranteed that the view passed into GetView will be of the same view type (defined in the data adapter) or null. If it’s null, you need to create a new view for that view type, otherwise you should try to reuse the view that is passed in. For a homogeneous list of TextView’s, it’s very simple:

    if (convertView == null)
    {
        TextView tv = new TextView();
        ....
        tv.setText("First Item");
    }
    else
    {
        TextView tv = (TextView) convertView;
        ...
        tv.setText("Recycled Item");
    }
    

    For simplicity sake, you could always return a new view instead of using the convertView, but performance wouldn’t be as great.

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

Sidebar

Related Questions

I do not fully understand classes. I have read the python documentation and several
This code comes from K&R. I have read it several times, but it still
I have read the RFC1928 several times and still couldn't understand what a compliant
I have read several posts about the configuration manager in VS2010 (or before) but
I have a directory with several .html files. Would like to read the list
I know this has been asked several times and I have read all the
I have read several times that after you delete a row in an InnoDB
I have read several times that using catch (Exception ex) { Logger.LogError(ex); } without
I have read several articles and questions on concept of foreign key vs independent
I have read several forums but can't find the solution to this. int sIndex

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.