> > Must be the reason that Electrum Drum
> > Machine (the only other Android drum sequencer I've seen) doesn't give
> > the user any visual indication of playback position.
>
Hi,
As the dev of Electrum Drum, I'll tell you the reason - I chose not to
show the position mainly to save precious
On Sun, Aug 30, 2009 at 2:48 PM, Nick_Zaillian wrote:
> Okay, actually, you can disregard that last comment.
> "Thou shalt not modify the UI from a background thread, for that is
> the way of sin" pretty explicitly gives me my answer. I gotta say,
> this is pretty inconvenient. Must be the rea
Nick_Zaillian wrote:
> Now, Mark, I have written an
> audio pattern playback implementation using a Handler that runs in my
> main Activity and, while it works, it is way less smooth and reliable
> than the implementation using the Timer/separate thread.
That's not surprising. Depending on what
Okay, actually, you can disregard that last comment.
"Thou shalt not modify the UI from a background thread, for that is
the way of sin" pretty explicitly gives me my answer. I gotta say,
this is pretty inconvenient. Must be the reason that Electrum Drum
Machine (the only other Android drum seq
Alright, I have made the appropriate changes to my SeqSwitch class so
that I no longer call setBackgroundResource from my onDraw (and in
fact no longer override onDraw at all). Now, Mark, I have written an
audio pattern playback implementation using a Handler that runs in my
main Activity and, wh
You should call setBackgroundResource() but NOT from onDraw(). Just
call this method from setIlluminated() for instance.
On Sun, Aug 30, 2009 at 1:06 PM, Nick_Zaillian wrote:
>
> Mark and Romain,
> Thanks. That was a much prompter response than I either expected or
> deserved.
> Romain, I am not
Mark and Romain,
Thanks. That was a much prompter response than I either expected or
deserved.
Romain, I am not sure that I totally understand what you've said. How
am I to set the background in accordance with the state of isChecked
and isIlluminated from within onDraw if not by calling
setBack
Do not call setBacgroundResource() in onDraw()! You are loading and
setting an image every time your view is drawn. You are actually
creating a infinite "loop";
onDraw() -> setBacgroundResource() -> invalidate() -> onDraw() ->
setBacgroundResource() -> etc.
On Sun, Aug 30, 2009 at 11:47 AM, Nick
> When, however, I pass it into the runnable (called
> PatternPlayTask) that I give to my Timer (which then calls
> SwitchController.runSwitches every 300 milliseconds as it steps
> through the pattern), it stops working.
Timer/TimerTask use a background thread. Thou shalt not modify the UI from
9 matches
Mail list logo