-
android 异步 执行 任务 例子 附讲解
Rules::The AsyncTask instance must be created in UI thread. .execute must be invoked on the UI thread.Never call objMyTask.onPreExecute(), objMyTask.doInBackground(), objMyTask.onProgressUpdate(), objMyTask.onPostExecute manually.The AsyncTask can be executed only once (an exception will be thrown if a second execution is attempted.)AsyncTask have Four Main Method... onPreExecute() doInBackground() onProgressUpdate() onPostExecute() onPreExecute-This method is called first when you start AsyncTask using objAsync.execute().And mostly this method is use for initializing dialog(ProgressDialog,CustomDialog) and showing. doInBackground-The main purpose of AsyncTask is accomplished by this method.Any non-UI thread process is running in this method.Such as Rss Feed Reader,Image and video Uploading and Downloading.You cant handle your View in this method.Because this method is non-UI thread.While any background process is running if you want to handle UI therea are onProgressUpdate method. after completion of process this method send result to OnPostExecute. onProgressUpdate-While backgrounding task is running ,you can handle your UI using this method .Such as status of downloading or uploading task.and this method is called from doInBackground.Using publishProgress() you can call onProgressUpdate method to update UI while process is running. onPostExecute -This method is called after the background computation finishes.The result of background process in passed in this method as parameters.And now you can dismiss progress dialog ,to indicate that background task is completed. You can cancel AsyncTask using objAsyncTask.cancel().then you just check in doInBackground, if (isCancelled()) { break; } else { //continue... } See this Image For more Clear.
- 2013-07-05下载
- 积分:1
-
ResponseCodes
The <code>ResponseCodes</code> class contains the list of valid response codes a server may send to a client.
- 2013-10-29 17:09:19下载
- 积分:1
-
用java实现的一个简单计算器
用java实现的一个简单计算器-achieved with a simple calculator
- 2022-03-20 14:36:24下载
- 积分:1
-
struts+ hibernate to achieve Logistics Management System
struts+hibernate实现物流管理系统-struts+ hibernate to achieve Logistics Management System
- 2022-03-22 23:19:50下载
- 积分:1
-
javaSever
利用java实现的服务端小程序,带有界面,java课程作业,希望可以对初学java的学者有所帮助。(Java implementation of the server side applet, with interface, java course assignments, hoping to help beginners java scholars.)
- 2018-05-03 09:46:43下载
- 积分:1
-
AndroidSMSFilter
Android平台的短信过滤器,用广播实现,按照来电号码的前缀匹配是否需要过滤。做了前后台切换,用了ListActivity。(SMS filter for Android platform with broadcast, according to the Caller ID prefix match the need for filtering. Do Taiwan before and after the switch, with the ListActivity.)
- 2013-03-06 20:19:05下载
- 积分:1
-
ibatis-class
java 框架ibatis学习文档下载 绝对值得(ibatis java framework document download is definitely worth learning)
- 2013-11-26 17:22:44下载
- 积分:1
-
Cluster-Building
Clustering Large Probabilistic Graphs
- 2014-02-05 16:36:20下载
- 积分:1
-
openfire3.7.1在myEclipse的源码部署(即时通讯例子部署)
软件版本: Myeclipse: myeclipse-9.0M1-win32 Openfire:openfire_3_7_1
- 2014-04-07下载
- 积分:1
-
一款改造的J2me手机游戏项目,三国战纪游戏的源代码,游戏界面略显粗糙。不过游戏基本框架已经具备。一小部分功能没有实现。
项目源码可以在eclips...
一款改造的J2me手机游戏项目,三国战纪游戏的源代码,游戏界面略显粗糙。不过游戏基本框架已经具备。一小部分功能没有实现。
项目源码可以在eclipse中直接运行。如果拿到wtk中测试的话,请修改源代码中的文件路径,譬如把"/res"去掉即可。
游戏名称:《三国战纪》手机版
游戏类型:横版过关
游戏支持屏幕:176*208
游戏支持需求:MIDP2.0,CLDC1.1
开发平台:J2ME+eclipse3.2+wtk2.5+jdk1.6
-A transformation of the mobile J2me Games project, the source code of the game Knights of Valor, a little rough game interface. But the basic framework of the game in place. NOT a small part of the functional implementation. Project source code can be run directly in the eclipse. Wtk get tested if so, please modify the source code of the file path, for example, put "/res " can be removed. Game Name: " Knights of Valor" mobile version of Game type: Games in support of cross-boundary version of the screen: 176* 208 games support needs: MIDP2.0, CLDC1.1 development platforms: J2ME+ eclipse3.2+ wtk2.5+ jdk1.6
- 2022-05-16 18:48:02下载
- 积分:1