0
当数据收到时,有什么办法刷新BroadcastReceiver中的片段ListView?如何刷新BroadcastReceiver中的片段ListView?
这是在碎片ListView的刷新方法扩展ListFragment:
public void refreshTicketList() {
list = readData.getAllRows();
Collections.reverse(list);
if (list.isEmpty()) {
Toast.makeText(getContext(), "No data, Please Swipe Down to get data.", Toast.LENGTH_LONG).show();
} else {
adapter = new ListAdapter(getContext(), list);
setListAdapter(adapter);
}
}
如何使用在广播接收器这种方法吗?
参考http://stackoverflow.com/questions/26163075/how-to -refresh-a-listview-from-a-broadcastreceiver – sasikumar
我无法理解它:( –