> So please someone tell me > there is some way I can have my method pause until a button is > pressed?
You can't. Though if you really want to you can, by placing your "main" code in a secondary thread and having it communicate with the UI thread. It can send a message to the UI thread to display the current configuration, then wait for the UI thread to respond that a button has been pressed. But the problem you run into is that the Android OS may want to deep- six your thread to free up RAM if the app is backgrounded. Dunno how you handle that. On Oct 25, 8:49 pm, Silverbullet999 <jv487...@gmail.com> wrote: > Basically I have created a blackjack game (first using just java) and > it falls under an infinite while loop (this is so that the deck data > is kept and everything works well. So first it deals the cards and > then it needs to wait for either the hit button (which is displayed) > or the stand button (which is displayed) to be clicked. I initially > did this with a while loop that would keep checking if buttons were > hit (basically when a button was hit, a static int would change and > stuff would occur). However this just causes the droid to freeze up > (thus far anyway) and also not refresh. So please someone tell me > there is some way I can have my method pause until a button is > pressed? I also need to know the proper way to use invalidate() so > that my textviews, pictureviews and such can be updated as the methods > change them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en