Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Dianne Hackborn
Posting a message won't cause a stack overflow -- messages aren't handled until you return back to the main message loop. On Fri, Apr 8, 2011 at 8:51 PM, Numeron wrote: > Sorry for above post, I hit the wrong button... > > > > > On Saturday, April 9, 2011 1:18:09 PM UTC+9:30, Numeron wrote: > >>

Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Numeron
Sorry for above post, I hit the wrong button... On Saturday, April 9, 2011 1:18:09 PM UTC+9:30, Numeron wrote: > > > > On Saturday, April 9, 2011 1:53:36 AM UTC+9:30, Dianne Hackborn wrote: >> >> On Fri, Apr 8, 2011 at 1:16 AM, Numeron wrote: >> >>> I wouldnt have thought it would work like a b

Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Numeron
On Saturday, April 9, 2011 1:53:36 AM UTC+9:30, Dianne Hackborn wrote: > > On Fri, Apr 8, 2011 at 1:16 AM, Numeron wrote: > >> I wouldnt have thought it would work like a busy method if its adding >> itself to something like an event queue or whatever, but I'll take your word >> on it. >> > >

Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Dianne Hackborn
On Fri, Apr 8, 2011 at 1:16 AM, Numeron wrote: > I wouldnt have thought it would work like a busy method if its adding > itself to something like an event queue or whatever, but I'll take your word > on it. > Well it is going to continually execute messages, even if it isn't needed. That is, if

Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Numeron
On Friday, April 8, 2011 4:51:23 PM UTC+9:30, Dianne Hackborn wrote: > > I wouldn't suggest having a handler sitting there trying to post messages > to itself as fast as possible. You are just writing code that sits there > consuming every bit of CPU it can get for no useful reason. Either use

Re: [android-developers] Smoothing out Handler sent repaint events

2011-04-08 Thread Dianne Hackborn
I wouldn't suggest having a handler sitting there trying to post messages to itself as fast as possible. You are just writing code that sits there consuming every bit of CPU it can get for no useful reason. Either use postMessageDelayed/AtTime() to actually have controlled timing, or just do inva

[android-developers] Smoothing out Handler sent repaint events

2011-04-07 Thread Numeron
Im having trouble smoothing out a hand made animation, specifically the logo on my site at www.users.on.net/~rossn The spinning sections of the logo are redrawn every frame rather a pair of rotating images, because rotating is slow and sometimes looks bad with poor rotation algorithms on other