5

在具有多个活动的 Android 应用程序中,每个活动的 UI 线程是一个单独的线程还是它们实际上是同一个线程(如全局,每个应用程序 UI 线程)?

4

2 回答 2

7

每个应用程序都有一个 UI 线程,用于运行前台中的任何 Activity。

这里有更多信息:

http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html

http://android-developers.blogspot.co.il/2009/05/painless-threading.html

于 2011-08-11T18:04:41.100 回答
4

不,Android 应用程序只有一个 UI 线程用于所有活动。

于 2011-05-25T13:50:10.943 回答