How to update listview after calling Asynctask to call webservice

前端 未结 3 1516
死守一世寂寞
死守一世寂寞 2021-01-03 12:30

I am calling a webservice through asynctask, to call the webservice i am calling one method named makeRequest() in

3条回答
  •  -上瘾入骨i
    2021-01-03 13:31

    You should update your List like this.

    Activity_name.this.runOnUiThread(new Runnable() {
    
    @Override
    public void run() {
          list = (ArrayList>) result;
          this.adapter.setList(list);
          this.adapter.notifyDataSetChanged();
        }
    });
    

提交回复
热议问题