Reputation: 1845
Can I add my app icon image on ProgressbarDialog
box in android?
Following is my code:
progressDialog = new ProgressDialog(this);
progressDialog.setCancelable(false);
progressDialog.setMessage("...");
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
Upvotes: 0
Views: 3463
Reputation: 5550
To add an icon to your ProgressDialog
add setIndeterminateDrawable(Drawable icon)
to the variable to ProgressDialog
:
progressDialog.setIndeterminateDrawable(Drawable_Icon_From_Drawable);
Here, setIcon()
will give you a title icon:
progressDialog.setIcon(your_icon);
Upvotes: 3
Reputation: 183
You can set app icon using setIcon()
method before show()
.
progressDialog.setIcon(R.mipmap.ic_launcher)
Upvotes: 0
Reputation: 2031
progressDialog.setIcon();
Use this to set app icon on progress dialog. Pass your app icon in above method.
Upvotes: 0