1

Android application loses/alters state after resuming

view story
linux-howto

http://stackoverflow.com – I am a total beginner to android-development so please bare with me on this. This is my sad attempt at writing a simple "Whack-a-Mole"-game. The UI consists of 9 buttons with no caption. A timer randomly picks one of the buttons that has to be clicked by the user (button gets caption "X"). If the user picks the correct button he gets 10 points. If no button (or the wrong button) is clicked in time, 10 points will be subtracted from the score. As you can see I add an OnClickListener to each button and delete its initial caption ("Button1", "Button2" ...) in the onCreate-Method. Everything wor (HowTos)