Code example for GradientDrawable

Methods: invalidateSelf, setColor

0
mIcon.setColorFilter(color, Mode.SRC_ATOP);
            // set color to be fully opaque 
            color |= 0xff000000;
        } 
        mPreviewDrawable.setColor(color);
        mPreviewDrawable.invalidateSelf();
    } 
     
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser)
    { 
        update(); 
    } 
     
    public void onStartTrackingTouch(SeekBar seekBar)
    { 
    } 
     
    public void onStopTrackingTouch(SeekBar seekBar)
    { 
    }