code: static void tintWidget(@NonNull ProgressBar progressBar, @ColorInt int color) {
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
              ColorStateList tint = ColorStateList.valueOf(color);
              progressBar.setIndeterminateTintList(tint);
          }
      }
docs: Tints the progress bar drawable to the given color. Only for devices running Lollipop or greater.
  
  @param progressBar the view to tint
  @param color       the color to use