title: Activity lifecycle example
body: <p>I've read numerous tutorials and seen a bunch of examples, but i'm having a hard time understand activity lifecycles. I understand what happens, my problem is I can't seem to figure out exactly how it should be coded. For example, let's say I have an simple app that added two numbers once a button was pressed. I know what to code for the onCreate method, but i'm stumped as to what to add the the onPause,onRestart etc. Would I just remove the contents of variables? Any help would be appreciated.</p>