> I try to be useful. Failing that, I try to be funny.
Now you accomplished both!

Thanks and have a GREAT DAY!

On Mar 30, 6:34 pm, Mark Murphy <[email protected]> wrote:
> BiiG wrote:
> > I believe Mark even
> > helped me with the last problem I got stuck on.
>
> I try to be useful. Failing that, I try to be funny.
>
> > I ended up doing this:
> > Random rn = new Random();
> >            long range = 6;
> >            long fraction = (long) (range*rn.nextDouble());
> >            int randomNumber = (int)(fraction)*1000+5100;
> >            pgs.playSound(1);
> >            Handler pgsHandler = new Handler();
> >            pgsHandler.postDelayed(new Runnable() {
> >             public void run() {
> >                    pgs.playSound(2);
> >             }
> >            }, randomNumber);
>
> > Do I have to make a handler? Or can I use the postDelayed of the
> > button?
>
> postDelayed() on the Button will be just fine.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 2.x Programming Books:http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to