Code example for GradientDrawable

Methods: setGradientType

0
                0, 0, 0, 1, 0 }); 
		 
		//paint.setColorFilter(new ColorMatrixColorFilter(colormatrix)); 
		 
		gradientShadow = new int[]{0xFF000000,0xFF000000};
		gradientdrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, gradientShadow);
		gradientdrawable.setGradientType(GradientDrawable.LINEAR_GRADIENT);
		 
		 
		//���þ���path,�ָ�ͼƬ�� 
		path = new Path();
		path.moveTo(0, 0);
		path.lineTo(mscreenX, 0);
		path.lineTo(mscreenX,centerY);
		path.lineTo(0, centerY);
		path.close();
		 
	} 
	 
		 
	/**