解决方案 »

  1.   

    报错的意思是说你的加载的SimpleAdapter有问题,不然你自己写一个adatper不要去继承已经提供的SimpleAdapter,,,
      

  2.   

    添加数据后adapter.notifyDataSetChanged();
      

  3.   

    The content of the adapter has changed but ListView did not receive a notification
    你的adapter没有刷新
    class MyHandler extends Handler {     @Override
         public void handleMessage(Message msg) {
             HashMap<String, String> hashMap = (HashMap<String, String>) msg.obj;
             list.add(hashMap);
    这里加上adapter.notifyDataSetChanged(); 
     }
      

  4.   

    还有你的代码的质量不太好,
    thread = new MyThread();
         thread.start();这个有什么用。
     public void handleMessage(Message msg) {
    这里面最好用switch(msg.what)判断一下
    }
    调用handler.sendE...
      

  5.   


    我查资料时别人也是这样说,但加上这句后报空指针异常(就单单加这一句,其它什么都没改),求指教。
    你这个是demo吗?发给我给你调调
      

  6.   

    这个你搞定没?我也碰到了,找到问题所在了:1.就是在你的list.clear()以后没有adapter.notifyDataSetChanged();
    2.就是确保setadapter的值是在此类里面public MyAdapter(Context context,ArrayList<ShowParams> sList){
    super();
    this.context=context;
    this.sList=(ArrayList<ShowParams>) sList.clone();
    this.inf=LayoutInflater.from(context);
    }
    也就是将this.sList=sList;改为this.sList=(ArrayList<ShowParams>) sList.clone();就行了