ListActivity列表​​不正确地刷新,全屏模式下? [英] ListActivity list does not refresh properly when in full screen?

查看:153
本文介绍了ListActivity列表​​不正确地刷新,全屏模式下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是ListActivity显示的图标化列表(使用自定义实现BaseAdapter的)。它不重新载入数据正常。当我改变适配器的内容,并通知该列表,看来旧数据借鉴了新数据的顶部,直到一个滚动事件发生的情况。旧的排借鉴的新行前,但是当我开始滚动旧行消失。

I am using a ListActivity to display an iconified list (using a custom implementation of BaseAdapter). It does not reload data properly. When I change the contents of the adapter and notify the list, it appears that the old data draws on top of the new data, until a scroll event happens. The old rows draw on top of the new rows, but the old rows disappear when I start scrolling.

但是,如果我设置ListActivity风格Theme.Dialog,它刷新罚款。 (presumably因为当在对话框中,将活动重新调整,每次列表内容的变化,迫使整个视图hiearchy的重绘?)

However if I set the ListActivity style to Theme.Dialog, it refreshes fine. (presumably because when in dialog, the activity resizes each time the list contents changes, which forces a redraw of the whole view hiearchy?)

任何想法如何使这项工作在我的全屏活动?

Any ideas how to make this work in my fullscreen activity?

感谢。

推荐答案

奇怪的是,如果我设置背景颜色,一切都刷新正常。如果没有背景颜色,我让我在原来的职位描述的更新问题。

Oddly enough, if I set a background color, everything refreshes properly. Without the background color, I get the refresh issues I described in the original post.

这篇关于ListActivity列表​​不正确地刷新,全屏模式下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆