开发者

When does the getView finished invoked?

开发者 https://www.devze.com 2023-03-09 00:33 出处:网络
I save the listview items position in a set in adapter method \"getView\", which saves the current dis开发者_如何学Goplaying items position,

I save the listview items position in a set in adapter method "getView", which saves the current dis开发者_如何学Goplaying items position,

but I can't get the set content after invoking setAdapter(myAdapter), It seems that it's multi-thread, if that, when can i get the set content.


but I can't get the set content after invoking setAdapter(myAdapter), It seems that it's multi-thread, if that,

It is not "multi-thread". However, the Adapter will not be immediately used when you call setAdapter(), any more than a TextView will be immediately updated when you call setText(). All GUI events are processed by the main application thread based off of a work queue -- calls to setAdapter() will not take effect until after whatever block of code you are in returns.

0

精彩评论

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