Code example for BitmapDrawable

0
		this.background = new PaintDrawable(backgroundColor);
	} 
 
	public void setBackgroundImage(Bitmap backgroundImage) {
		releaseDelegate(); 
		this.background = new BitmapDrawable(backgroundImage);
	} 
 
	public void setBackgroundDrawable(Drawable drawable) {
		releaseDelegate(); 
		this.background = drawable;
		onStateChange(getState());
	} 
 
	@Override 
	public void setAlpha(int alpha)
	{ 
		super.setAlpha(alpha);
		this.alpha = alpha;
	} 
Connect your IDE to all the code out there  Get Codota for Java