java.lang.StackOverflowError for sdk1_5r3

by Romain Guy » Thu, 17 Sep 2009 15:10:31 GMT


Sponsored Links
 he problem is the number of parents you have.

On Wed, Sep 16, 2009 at 11:52 PM, jagtap.jj <jagtap...@gmail.com> wrote:



--
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support. All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Help converting C# code (Isn't there anyone that will help out here)

I am trying to convert a C# game to Android and need some help with
the graphics stuff.

Can anyone show me how to convert this to Java?

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace MyGame
{
 public partial class MyButton : Button
 {
   GraphicsPath path;
   GraphicsPath innerPath;

   private bool _clicked = false;
   public bool Clicked
   {
     get { return _clicked; }
     set
     {
       _clicked = value;
       Invalidate();
     }
   }

   public MyButton()
   {
     InitializeComponent();
   }

   protected override void OnPaint(PaintEventArgs pevent)
   {
     Graphics g = pevent.Graphics;
     g.SmoothingMode = SmoothingMode.AntiAlias;

     // Create painting objects
     Brush b = new SolidBrush(this.ForeColor);

     // Create Rectangle To Limit brush area.
     Rectangle rect = new Rectangle(0, 0, 150, 150);

     LinearGradientBrush linearBrush =
       new LinearGradientBrush(rect,
       Color.FromArgb(20,20,20),
       this.ForeColor,
       225);

     path = new GraphicsPath();
     innerPath = new GraphicsPath();

     path.AddArc(0, 0, 270, 270, 180, 90);
     path.AddArc(120, 0, 30, 30, 270, 90);
     path.AddLine(150, 0, 150, 85);
     path.AddArc(100, 100, 100, 100, -90, -90);
     path.AddLine(100, 150, 0, 150);
     path.AddArc(0, 120, 30, 30, 90, 90);

     innerPath.AddArc(10, 10, 250, 250, 180, 90);
     innerPath.AddArc(130, 10, 10, 10, 270, 90);
     innerPath.AddLine(140, 0, 140, 90);
     innerPath.AddArc(90, 90, 100, 100, -90, -90);
     innerPath.AddLine(90, 140, 10, 140);
     innerPath.AddArc(10, 130, 10, 10, 90, 90);

     this.Region = new Region(path);

     PathGradientBrush pgbrush = new PathGradientBrush(innerPath);
     pgbrush.CenterPoint = new Point(75, 75);
     pgbrush.CenterColor = Color.White;
     pgbrush.SurroundColors = new Color[] {
                            Color.FromArgb(250,this.ForeColor) };

     if (_clicked == false)
     {
       g.FillPath(linearBrush, path);
       g.FillPath(b, innerPath);
     }
     else
     {
       g.FillPath(linearBrush, path);
       g.FillPath(pgbrush, innerPath);
     }

     // Dispose of painting objects
     b.Dispose();
     pgbrush.Dispose();
     linearBrush.Dispose();
   }

   protected override void OnMouseEnter(EventArgs e)
   {
     this.Cursor = Cursors.Hand;
     base.OnMouseEnter(e);
   }

   protected override void OnMouseLeave(EventArgs e)
   {
     this.Cursor = Cursors.Arrow;
     base.OnMouseLeave(e);
   }

   protected override void OnMouseDown(MouseEventArgs mevent)
   {
     _clicked = true;
     base.OnMouseDown(mevent);
   }

   protected override void OnMouseUp(MouseEventArgs mevent)
   {
     _clicked = false;
     base.OnMouseUp(mevent);
   }
 }
}

-- 

2. Can anyone hook me up with an Exchange email account that I could use for testing?

Hi,
   I'm putting together a lightweight email provider for use with one
of my apps (based on the K9 mail client).  I'd love to test it with an
Exchange account before releasing it.

   I'm hoping that some kind sole out there will be able to hook me up
with an Exchange account that I can use for testing.

Thanks a bunch!

Steve

-- 

3. Control a graphic with android buttons

4. external input device

5. Programmatically setting a new default ringtone without the ringtone picker

6. Setting new default ringtone without using RingtonePicker?

7. Launch Activity from BroadcastReciever