![]() When they are called in the main thread, they are called synchronously, which means that the UI will remain completely unresponsive until the operation completes. Network operations and database calls, as well as loading of certain components, are common examples of operations that one should avoid in the main thread. To keep your application responsive, it is essential to avoid using the main thread to perform any operation that may end up keeping it blocked. The main thread is responsible for dispatching events to the appropriate user interface widgets as well as communicating with components from the Android UI toolkit. ![]() When an application is launched in Android, it creates the first thread of execution, known as the “main” thread. Every Android developer, at one point or another, needs to deal with threads in their application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |