Code example for ShapeDrawable

Methods: getShape

0
	 * @see android.view.View#onSizeChanged(int, int, int, int) 
	 */ 
	@Override 
	protected void onSizeChanged(int w, int h, int oldw, int oldh) {
		super.onSizeChanged(w, h, oldw, oldh);
		mShapeDrawable.getShape().resize(w, h);
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see android.view.View#draw(android.graphics.Canvas) 
	 */ 
	@Override 
	public void draw(Canvas canvas) {
		super.draw(canvas);
		mShapeDrawable.draw(canvas);
	} 
}