I got a Problem with a spinning progressbar. I start the ProgressDialog within a AsyncTask its comming up, but it does not spin.
private class ProgressTask extends AsyncTask<Boolean, Void, Boolean> {
@Override
protected void onPreExecute() {
ProgressDialog.show(LoginActivity.this, "", "Loading. Please wait...", true);
}
@Override
protected Boolean doInBackground(Boolean... params) {
return true;
}
}
Within the following method the AsyncTask is started.
public void login(View view) {
new ProgressTask().execute(true);
startActivityForResult((new Intent().setClass(view.getContext(), PPAClientActivity.class)), 0);
}
I didnt got any idea what i am doin wrong.
Thanks for help in advance.
try this way