dotProgressBar.setStartColor(startColor);
dotProgressBar.setEndColor(endColor);
dotProgressBar.setDotAmount(amount);
dotProgressBar.setAnimationTime(time);
// or you can use buildernewDotProgressBarBuilder(this)
.setDotAmount(5)
.setStartColor(Color.BLACK)
.setAnimationDirection(DotProgressBar.LEFT_DIRECTION)
.build();