One button used for two Action
===

Can any one tell me? how can i use the same button for two Action? 
Like em using one button in my activity that calculate some values and after calculating the when i  again press same button then reset the all fields. Like in this Application
http://www.craziness.com/games/play-love-tester/ when i test the love by pressing the button
then i again press the same button then all fields reset.
what should i use in my activity for the above problem?