set Color Of ProgressBar - Android User Interface

Android examples for User Interface:ProgressBar

Description

set Color Of ProgressBar

Demo Code


//package com.java2s;
import android.widget.ProgressBar;

public class Main {
    public static void setColorOfProgressBar(ProgressBar progressBar,
            int color) {
        progressBar.getIndeterminateDrawable().setColorFilter(color,
                android.graphics.PorterDuff.Mode.MULTIPLY);
    }/*from   w w  w  .  j ava2 s  .  c o m*/
}

Related Tutorials