English 中文(简体)
清单 + 每一项目的单项案文:
原标题:ListView + single textview in each item = excessive garbage collecting

首先,我有一个简单的<代码>ListView。 采用<代码>BaseAdapter,并利用“观点”模式一,就有一个<编码>>,即每条<代码>,即上,以不同的<代码>String 标明案文。 每一座楼都有不同的长度,可以分成多个线。

过多的垃圾收集发生在你发卷时,是由/code>造成的。 在<代码>TextView类别内使用。 它正在创建<条码>float[],然后由垃圾收集者收集,并在我的<条码>中形成一 st。 ListView scrolling. 我在跟踪我通过分配跟踪器的滚动之后得出这一结论。 值得注意的是,它不是收集大量记忆,而是收集小记忆。

自2006年以来 即便我把我的法典简化到我假定有人在我面前跑到这里的基本面,我也正在处理这个问题。 因为这是一种制度 b,而不是我可以在使用<>TextView的同时做些什么,你建议我用什么来做这项工作?

最佳回答

我确定了行为,尽管我仍然不理解为何发生这种行为。 在我的<密码>中,ListView 我将CacheColorHint定为#0000,这在与我的全球主题环境(android:windowBackground=@nullandroid:windowContentOverlay=@null相结合时造成了问题。 我不理解为什么会造成过多的GC,也不知道为什么仅仅改变切身。 ColorHint to #FFFFFF will effect it, but what the绘画的等级并不总是遵循最明显的道路。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签