Theme, UI thread, work theme, Async task

I'm confused, trying to understand the concept Processes, and Threadsin Android. Below I will discuss a few questions. These may be silly questions, but please help me answer in order to answer these questions and clarify my doubts.

1) If I create a thread, where will it work? in Main (UI) Thread?

2) If my created thread works in the background as a worker Thread, then what's the point AsyncTask(I mean, how is it better than a thread)?

3) Is it possible to create Thread in AsyncTask?

+4
source share
3 answers
 1. If i create a thread where it will run? in Main(UI) thread/Worker Thread?

.

2.If my created thread runs on worker `Thread` then what is the use of `AsyncTask` (I mean how it is better than thread)?

AsyncTask .. , , Activity.. AsyncTask. Ui, onProgressUpdate(). , .

 3)Can we create a thread in Async task?

, , , AsyncTask doInBackGround(), Thread, Thread AsyncTask.

+7
  • Activity. . Activity . .
  • Async - , , backround, . : .
  • Asynctask .
+6

1) , .

2) Async Task . - . progressdialogs. ( AsyncTask), , .

3) , . , .

+1
source

Source: https://habr.com/ru/post/1535024/


All Articles