I show ProgressDialog in AsyncTask method. My code as below:
@Override
protected void onPreExecute() {
super.onPreExecute();
progDailog = new ProgressDialog(MyActivity.this.getParent());
progDailog.setIndeterminate(false);
progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progDailog.setCancelable(true);
progDailog.show();
}
The dialog showed has a long space at right. But I want to show only the left cycle image without the right space. How to modify it?
The space on the right is because normally there is also a Text to the right of the spinner. If you just want to show the spinner try it with AlertDialog:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
ProgressBar pbar = new ProgressBar(this);
builder.setView(pbar);
builder.create().show();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With