I am displaying progress dialog box on screen, I can not make any action until the dialog got dismissed.
How can I make some action (like Clicking on button) on screen even if progress dialog box is loading.
Loading should not stop when I click on any of button.
Here is my AsyncTask:
//My Progress Dialog
progress = ProgressDialog.show(DefaultMarketWatch.this, "",
"Loading", true);
// My AsyncTask, Which executes for every 1 sec.
public class RetriveStock extends AsyncTask<Void, Void, ArrayList<User>> {
@Override
protected ArrayList<User> doInBackground(Void... params) {
message += client.clientReceive(1); // Receives data from TCP socket.
return null;
}
@Override
protected void onCancelled() {
super.onCancelled();
}
protected void onPostExecute(ArrayList<User> result) {
progress.dismiss(); // Dismissing my progress dialog
// My UI updations and all using "message" string.
super.onPostExecute(result);
}
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
}
}
Please help..