I am using ProgressDialog for showing progressbar
ProgressDialog progressDialog = new ProgressDialog(context);
progress
The perfect and simple solution for custom color progress bar.
public class CustomProgressBar extends ProgressBar{
public CustomProgressBar(Context context) {
super(context);
this.setIndeterminate(true);
this.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.app_blue), PorterDuff.Mode.MULTIPLY);
}
public CustomProgressBar(Context context, AttributeSet attrs) {
super(context, attrs);
this.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.app_blue), PorterDuff.Mode.MULTIPLY);
}
public CustomProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
}
and use it in your layout.