Just joined this forum - seems like there's a lot of good stuff on here, so fingers crossed someone can help with this little problem! ;)
I'm putting together a simple card game, so I need to turn over a card on click, do some logic, then sometimes turn it back over, sometimes leave it face down. The logic is fine, but when I was handling all the logic in the onClick, it was never showing the card face. I saw on Google groups that it doesn't update the ImageView until you end function and hand control back to Android, so I broke all my logic into a separate function.
My new function works fine if you call it direct (except that then the card face still doesn't show), but when I put it into a new thread (at which point the card does show), it crashes when I try to flip it back to the back of the card.
The line which is crashing is
I've done some debug calls and successfully called properties of GridView, ImageView and cardback1, so I think it must be a problem with setImageResource itself. Has anyone else had problems calling this away from the main thread?