Code example for ColorDrawable

0
    public void setLabel(int resId) {
        setLabel(getResources().getText(resId));
    } 
 
    public void setSelectionHandlerColor(int color) {
        setSelectionHandlerDrawable(new ColorDrawable(color));
    } 
 
    public void setSelectionHandlerColorResource(int resId) {
        setSelectionHandlerColor(getResources().getColor(resId));
    } 
 
    @SuppressWarnings("deprecation") 
    public void setSelectionHandlerDrawable(Drawable drawable) {
        selectionHandler.setBackgroundDrawable(drawable);
    } 
 
    public void setSelectionHandlerDrawableResource(int resId) {
        setSelectionHandlerDrawable(getResources().getDrawable(resId));
    }