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.
精彩评论