asyncTast异步访问网络笔记

来源:互联网 发布:联友椅业 知乎 编辑:程序博客网 时间:2024/05/22 01:48

通过在主线程中执行myAsy.execute(p1)时将参数传过去,参数类型为下面第一个参数类型


//第一个参数为url,第二个为进程进度,第三个为doInbackground返回类型

public class MyAsy extends AsyncTast<String,Integer,ArrayList<String>>{


//此方法在子线程中执行,其它几个方法都在主线程中执行

。。doInBackground(String[] params){

}


onProgressUpdate()


}

0 0