Inheritance: android.graphics.drawable.Drawable
Ejemplo n.º 1
0
		public RoundRects (Context context)
			: base (context)
		{
			mRect = new Rect (0, 0, 120, 120);

			int[] colors = {
				unchecked((int)0xFFFF0000), unchecked((int)0xFF00FF00), unchecked((int)0xFF0000FF)
			};

			mDrawable = new GradientDrawable (GradientDrawable.Orientation.TL_BR, colors);
			mDrawable.setShape (GradientDrawable.RECTANGLE);
			mDrawable.setGradientRadius ((float)(Math.Sqrt (2) * 60));
		}
Ejemplo n.º 2
0
		static void setCornerRadii (GradientDrawable drawable, float r0, float r1, float r2, float r3)
		{
			drawable.setCornerRadii (new float[] { r0, r0, r1, r1, r2, r2, r3, r3 });
		}