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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:30:38+00:00 2026-05-26T12:30:38+00:00

First of all I have a simple ListView . Implementing the BaseAdapter and utilizing

  • 0

First of all I have a simple ListView. Implementing the BaseAdapter and utilizing the ViewHolder pattern I simply have a TextView that on each getView() call sets the text with a different String. Each string has various lengths and it can break into multiple lines.

The excessive garbage collecting occurs when you scroll, it is caused by the StaticLayout that is used inside of the TextView class. It is creating float[]‘s and then the garbage collector collects them and causes a stutter in my ListView‘s scrolling. I came to this conclusion after tracking my scrolling through the Allocation Tracker. Note that excessive is not that it is collection huge chunks of memory but lots of small ones.

Since I am running into this problem even when I simplify my code down to the basics I assume someone has run into this before me. Because this is a system bug and not something I can work around while still using the TextView, what do you suggest I use as a workaround for this bug?

  • 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-26T12:30:38+00:00Added an answer on May 26, 2026 at 12:30 pm

    I fixed the behavior, although I still do not understand why it happened. In my ListView I was setting the cacheColorHint as #00000000 and this was causing problems when combined with my global theme settings of android:windowBackground=@null and android:windowContentOverlay=@null. I don’t understand why it would cause excessive GC nor why simply changing the cacheColorHint to #FFFFFFFF would effect it, but what the drawing hierarchy of Android does not always follow the most obvious path.

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

Sidebar

Related Questions

First of all, excuse my poor topic title. I simply have no idea how
First of all I have to admit that my programming skills are pretty limited
First of all, I have to say that I'm going to talk about System.ComponentModel.Component
All I'm looking to do, is have a ListView with a textView and EITHER
First of all I have to inform you that I am new to Objective-C
I have a very simple VHDL testbench that should run. My components all have
First of all, what I have: a simple div, which is onClick switched to
So first of all I have such image (and ofcourse I have all points
To execute my application in iPhone first of all I have to add provisioning
First of all, I have no idea if the title even reflects my question.

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.