开发者

Adapter & Theme.Dialog & refreshing content

开发者 https://www.devze.com 2023-01-07 06:43 出处:网络
Theres Activity A with a ListView using SimpleCursorAdapter and for each row, theres a ImageView that should be displayed, according to a column result number in SQLite. Then theres Activity B which i

Theres Activity A with a ListView using SimpleCursorAdapter and for each row, theres a ImageView that should be displayed, according to a column result number in SQLite. Then theres Activity B which is a Activity with the Theme.Dialog. When i open up the Activity B (via startActivityForResult) i have some items, selecting one item, causes the Activity B to be finished. So, when i get 开发者_如何学Pythonback to Activity A, i can see through the LogCat that bindView is being called but not newView, causing the ImageView to not be refreshed with the new image.

I've tried calling notifyDataSetChanged() in onResume() and onActivityResult(), since both are called when i get back from Activity B but nothing happens!

So, theres a Activity C which is a regular Activity that does the same thing as Activity B, but its NOT a Theme.Dialog Activity, and when i get back from C to A, newView is being called and thus the ImageView is being refreshed! :D

What should i do?


ive worked my way implementing FilterQueryProvider. Playing with runQuery gave me what i wanted! :)

0

精彩评论

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

关注公众号