I have a class AsyncTask which does the download, and by itself while the download is in progress, the spinning ProgressBar should be displayed.
The implementation of the ProgressBar itself is understandable, but how to make it so that the activation in which the download starts is darkened a little and the ProgressBar starts spinning in the center, at the end of the download it all disappears and only the activation over which the ProgressBar was called is left ...
I thought to do so, in AsyncTask in the onPreExecute() method, send an intent to open another activation, which will be translucent and set the ProgressBar in it, when AsyncTask work, then in the onPostExecute() method, close the activation ...
But I think this is a crooked idea ... Tell me how it is done correctly?