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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:23:57+00:00 2026-05-24T09:23:57+00:00

I have a rather expensive Layout that i inflate to a listview’s childrens. If

  • 0

I have a rather expensive Layout that i inflate to a listview’s childrens.
If the listview shows 5 childrens eatch time getView() will inflate only 5 (maybe one-two more) of my expensive Layouts. And then reuse it.
This process might take some time but it’s ok.(It’s at the same time i download data from the Internet so doesn’t ruin the UX).

The problem is that if i scroll , at the beggining of the scrolling one convertView is null so the listview needs to inflate one more time. This is happening only the first time i scroll.
Is there any way to avoid that? Notice that i don’t resize any of the children or the Listview. Is there a way to inflate that extra view at the beggining so i avoid the Scrolling Lag?

UPDATE
Also to be specific:

My listview shows 3and a half rows .. Meaning 4.The adapter inflates 5. What the adapter whats to inflate another one? Maybe there is a more elegant solution to that

  • 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-24T09:23:57+00:00Added an answer on May 24, 2026 at 9:23 am

    Why not just create a cache of views when your activity is started, or in your adapter’s constructor? getView() could return views from this cache if any are available, or create its own as it normally would if no cached views are available.

    (I would not recommend creating more than n+1 views, though, where n is the number of views you expect to have on the screen at any one time. And I strongly recommend against ever trying to recycle old views back into the cache!)

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

Sidebar

Related Questions

Say I have a Stream that's rather expensive to compute. I can easily create
I have a rather expensive query that returns a page of results: SELECT *
I have some expensive function f(x) that I want to only calculate once, but
I have rather large project that uses ICU regex classes. Basically it might run
I have some rather odd behavior in my D program that I've narrowed down
I have a rather simple ListView row: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content
I have a rather huge query that is needed in several stored procedures, and
I have a rather expensive library which I've inherited from another project. This assembly
Have a rather simple question. Does anyone knows if i can use jparallax both
I have a rather large text corpus, of which I would like to check

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.