开发者

Update ExpandableListView child from handler

I have an ExpandableListView with children that have text supplied on creation, and an image that is downloaded via a handler on it's group click.

Right now when we click a group, it expands and the text is displayed. The image is downloaded and made into a drawable and inserted into the child's data map.开发者_开发知识库 It does not update when it has downloaded, only when another part of the ExpandableListView has been clicked.

EX: I click the first group, text shows up in the new child. I click the second group, the image appears in the child of the first, only text appears in the child of the second.

How can I force the child view to update when it receives the image data?


You can always use the adapter.notifyDataSetChanged(). Call that from inside your handler method (ie. once the image data is there).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜