ProgressDialog dialog = ProgressDialog.show(ctx,null,null);
dialog.getWindow().setGravity(Gravity.CENTER);
dialog.setContentView(new ProgressBar(ctx));
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
J'ai besoin de changer la couleur du cercle de chargement
Réponses:
0 pour la réponse № 1<style name="DialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorPrimary">@color/YOUR_COLOR</item>
</style>
et mettre à la boîte de dialogue:
ProgressDialog progressDialog = new ProgressDialog(MainActivity.this, R.style.DialogStyle);