My app\'s minimum API-level is 19 (KitKat), and contains a layout with a horizontal ProgressBar. I\'m using android:progressTint attribute to tint
If you want to do it programmatically, try this
public static void setSeekbarTint(SeekBar seekbar, int color) {
PorterDuff.Mode porterDuffMode = PorterDuff.Mode.SRC_IN;
if (seekbar.getIndeterminateDrawable() != null)
seekbar.getIndeterminateDrawable().setColorFilter(color, porterDuffMode);
if (seekbar.getProgressDrawable() != null &&
seekbar.getProgressDrawable() instanceof LayerDrawable) {
LayerDrawable layerDrawable = (LayerDrawable) seekbar.getProgressDrawable();
GradientDrawable gradientDrawable = (GradientDrawable) layerDrawable.findDrawableByLayerId(android.R.id.background);
layerDrawable.setColorFilter(color, porterDuffMode);
seekbar.setProgressDrawable(layerDrawable);
gradientDrawable.setColorFilter(Color.WHITE, porterDuffMode);
} else if (seekbar.getProgressDrawable() != null &&
seekbar.getProgressDrawable() instanceof ClipDrawable) {
ClipDrawable clipDrawable = (ClipDrawable) seekbar.getProgressDrawable();
clipDrawable.setColorFilter(color, porterDuffMode);
seekbar.setProgressDrawable(clipDrawable);
}
}