Code example for ShapeDrawable

Methods: getBoundsinvalidateSelf, getPaint

0
			mRedText.setText(Integer.toString(red)); 
			mGreenText.setText(Integer.toString(green)); 
			mBlueText.setText(Integer.toString(blue)); 
            redSeekBar.setProgress(red); 
            greenSeekBar.setProgress(green); 
            blueSeekBar.setProgress(blue); 
			mNewBoxBackground.getPaint().setShader(getPreviewBackground(newColor, mNewBoxBackground.getBounds())); 
			mPreviousBoxBackground.getPaint().setShader(getPreviewBackground(mPreviousColor, mPreviousBoxBackground.getBounds())); 
			mNewBoxBackground.invalidateSelf(); 
			mPreviousBoxBackground.invalidateSelf(); 
			broadcastColorChange(); 
		} 
 
	}; 
 
	/** 
	 * Returns a "glossy" background using the given color and the given bounds. Currently, 
	 * the gloss is applied vertically from top to bottom. 
	 * 
	 * @param color the color to be "glossed" 
	 * @param rect the bounds of the area to be glossed