开发者

Awkward CursorAdaptor view recycling

I'm using a ResourceCursorAdapter to display a list of downloads from a ContentProvider that track's my application's downloads -- modeled after Android's DownloadProvider.

The problem is that when a download is actively running it frequently calls bind view--every few seconds--to update a download progress bar, with a view object that is NOT currently associated with a given item/cursor position. Thus, bind view is constantly recycling and binding view objects to different item/cursor positions (call it "flip-flopping"). Note, I only have one view type.

This is especially a problem if the user attempts to push a button on one of the items while it's being bound to a different view object and cursor position, which results in an event being fired for the wrong data.

Does anyone have advice on how to minimize unnecessary view recycling, or not have the view objects flip-flop between positions?

This view object flip-flopping appears to only occur for the bottom and top list items (of the three on the screen), while the middle item/cursor remains tied to a single view o开发者_运维知识库bject.

Thanks, -Ivan

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜