Dialog ProgressBar
Dialog dialog = null; @Override public void onStart() { super.onStart(); if (dialog == null) { dialog = new Dialog(MainActivity.this); Window window = dialog.getWindow(); window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); window.setDimAmount(0); dialog.setContentView(new ProgressBar(MainActivity.this)); dialog.show(); } } @Override public void onFinish() { super.onFinish(); if (dialog != null) { dialog.dismiss(); dialog = null; } } |