公司的项目需要加入expandablelistview,所以就出问题了,我们是在Poisearher的回调函数提取数据,并且赋值给全局变量list<Stirng>,但是回调函数是在服务里面,所以无法像子线程发送消息。
一.在 oncrate 上面写handler,接收消息,更新UI
boolean isupdate = false;
protected static final int GUIUPDATEIDENTIFIER = 0x101;
// * Function : 实现handleMessage()方法,用于接收Message,刷新UI
Handler myHandler = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case PoiSearchActivity.GUIUPDATEIDENTIFIER:
refreshUI();//更新函数,可以在oncrate 后面写
break;
}