How to refresh a ListView from a BroadcastReceiver?
问题 If I call notifyDataSetChanged() on the custom adapter associated to my ListView, all the views should refresh themself ( getView() will be called). Now I have a BroadcastReceiver that is listening to an event. When the event fires, the ListView must be refreshed. How can I achieve this? Thanks! 回答1: If you refresh listview from receiver you'll have code like this: BroadcastReceiver br; public final static String BROADCAST_ACTION = "BROADCAST_ACTION"; br = new BroadcastReceiver() { public