Code example for SeekBar

Methods: getProgress

0
  public void setOnColorChangedListener(OnColorChangedListener listener) {
    this.listener=listener;
  } 
   
  public int getColor() { 
    return(Color.argb(0xFF, red.getProgress(),
                      green.getProgress(), blue.getProgress()));
  } 
   
  public void setColor(int color) {
    red.setProgress(Color.red(color));
    green.setProgress(Color.green(color));
    blue.setProgress(Color.blue(color));
    swatch.setBackgroundColor(color);
  } 
   
  private SeekBar.OnSeekBarChangeListener onMix=new SeekBar.OnSeekBarChangeListener() {
    public void onProgressChanged(SeekBar seekBar, int progress, 
                                  boolean fromUser) { 
      int color=getColor();