android教程.doc
在实际应用中,经常会遇到处理耗时的任务,例如网络连接、数据库操作等。如果将这些操作放在主线程(UI线程)中,就会造成UI挂起的现象。在 Android 中,可以使用 AsyncTask 和 Handler 两个异步方法来解决这个问题。(In practical applications, we often encounter time-consuming tasks, such as network connection, database operation and so on. If these operations are placed in the main thread (UI thread), the UI will hang. In Android, two asynchronous methods, asynctask and handler, can be used to solve this problem.)
页:
[1]