[Solved] Queries too long(1-3 seconds), show a loading process icon [closed]


Use AsyncTask to do the processing in the background and communicate the information back to the UI on completion. Quoting the documentation,

AsyncTask enables proper and easy use of the UI thread. This class
allows to perform background operations and publish results on the UI
thread without having to manipulate threads and/or handlers.

There’s a basic example of subclassing AsyncTask in the documentation.

solved Queries too long(1-3 seconds), show a loading process icon [closed]