private void AddBall(float x, float y)
            {
                var rnd = new Random();

                var circle = new OvalShape();
                circle.Resize(BallSize * density, BallSize * density);
                var drawable = new ShapeDrawable(circle);
                var shapeHolder = new ShapeHolder(drawable);
                shapeHolder.X = x;
                shapeHolder.Y = y - (BallSize / 2f);
                var red = 100 + rnd.Next(155);
                var green = 100 + rnd.Next(155);
                var blue = 100 + rnd.Next(155);
                var color = new Color(red, green, blue);
                var darkColor = new Color(red / 4, green / 4, blue);
                var paint = drawable.Paint;
                var gradient = new RadialGradient(37.5f, 12.5f, 50f, color, darkColor, Shader.TileMode.Clamp);
                paint.SetShader(gradient);
                shapeHolder.Paint = paint;
                balls.Add(shapeHolder);
            }
        private void CreateBallView()
        {
            this.FV = new FrameLayout(this);
            var shape = new OvalShape();
            var dr = new ShapeDrawable(shape);
            dr.Paint.Color = Color.WhiteSmoke;
            dr.Paint.Alpha = 100;
            this.FV.Background = dr;

            //������βü��
            //this.FV.SetClipChildren(true);
            //this.FV.SetClipToPadding(true);

            this.FV.SetOnTouchListener(this);
            this.FV.SetOnClickListener(this);

            var img = new ImageView(this);
            img.SetImageResource(Resource.Drawable.Icon);
            this.Img = img;//������ FreameLayout ��������

            this.FV.AddView(img);
            var param = new WindowManagerLayoutParams();
            param.Width = WindowManagerLayoutParams.WrapContent;
            param.Height = WindowManagerLayoutParams.WrapContent;

            //������������Ӧ���� ԭ�㣬 ������ó�����ֵ�� �϶���ʱ��λ�û��д��
            param.Gravity = GravityFlags.Top | GravityFlags.Left;
            param.Flags = WindowManagerFlags.NotFocusable;

            //�������ã� ��Ȼ���� WindowManager.AddView ��ʱ�򱨴��
            param.Type = WindowManagerTypes.Phone;
            param.Format = Android.Graphics.Format.Transparent;

            this.WindowManager.AddView(this.FV, param);
        }
    private Drawable CreateDrawable (int color)
    {
      var ovalShape = new OvalShape ();
      var shapeDrawable = new ShapeDrawable (ovalShape);
      shapeDrawable.Paint.Color = new Color (color);
      if (hasShadow && !HasLollipopApi) {
        var shadowDrawable = Resources.GetDrawable (size == FabSize.Normal ? 
          Resource.Drawable.fab_shadow :
          Resource.Drawable.fab_shadow_mini);

        var layerDrawable = new LayerDrawable (new Drawable[]{ shadowDrawable, shapeDrawable });
        layerDrawable.SetLayerInset (1, shadowSize, shadowSize, shadowSize, shadowSize);
        return layerDrawable;
      } else {
        return shapeDrawable;
      }
    }