Code example for GradientDrawable

0
		if (centerDrawable == null) {
			centerDrawable = getWheelValDrawable(); //getContext().getResources().getDrawable(R.drawable.wheel_val);
		} 
 
		if (topShadow == null) {
			topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
		} 
 
		if (bottomShadow == null) {
			bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
		} 
 
		//setBackgroundResource(R.drawable.wheel_bg); 
		setBackgroundDrawable(getWheelBackground());
	} 
	 
	/** 
	 * Direct programmatic creation of drawables (instead of R & res files) 
	 */ 
	private int dipToInt(float dips) 
	{