Code example for ComposeShader

	LinearGradient gradient = new LinearGradient(0, 0, 0, mBitmap.getHeight(), mStartColor, mEndColor, Shader.TileMode.CLAMP);
	// Make a combined shader -- a performance win. 
        // The linear-gradient is the 'SRC' and the bitmap-shader is the 'DST'. 
	// Drawing the DST in the SRC will provide the opacity. 
	mPaint.setShader(new ComposeShader(bitmapShader, gradient, PorterDuff.Mode.DST_IN));
Stop searching for code, let great code find you!  Add Codota to your java IDE