Problem with onItemClickListener

Last Updated:

  1. mojazu

    mojazu New Member This Topic's Starter

    May 30, 2010
    Likes Received:
    Hi people. I'm new to android and I'm getting some troubles, especially with listeners or threads.

    Right now I'm making a memory game for doing pairs. The cards are ImageViews within a GridView.

    I'm doing all the logic (of comparing card values, if it's the first or second selected card and all that stuff) inside of the onItemClickListener of that GridView.

    When the user selects the second card, both cards selected should flip down again or disappear. Well, the logic works fine, but the process is so fast that the user can't view which was the second card. So I introduced a little delay, but I discovered that the screen won't get refreshed while the OnItemClick method is running, so the user will never know which was the second card.

    Am I explaining myself? Any idea? Some friend told me I could resolve this with the use of threads, but I don't have any idea.

    Thanks in advance. :)


Share This Page